Git Product home page Git Product logo

Comments (8)

filmil avatar filmil commented on May 24, 2024

Alternative: is it possible to somehow arrange the crates so that the circular dependency is removed altogether?

from rust_icu.

kpozin avatar kpozin commented on May 24, 2024

We could theoretically move the tests that cause the cycle out into a new crate, but that seems like a risky practice.

from rust_icu.

filmil avatar filmil commented on May 24, 2024

To short-circuit the search, which crates are forming a cycle? Perhaps indeed we can move things around so that we don't need to patch things up to publish them.

from rust_icu.

kpozin avatar kpozin commented on May 24, 2024

It's ucal and udat, because

  • udat has a method that takes a &ucal::UCalendar

pub fn set_calendar(&mut self, calendar: &ucal::UCalendar) {

  • In ucal tests, we're parsing dates (udat::UDateFormat)

UDateFormat::new_with_pattern(&locale, &tz, &pattern)

from rust_icu.

filmil avatar filmil commented on May 24, 2024

I removed my earlier message, since I misunderstood the options we had.

So now I see and understand how this came about. Given that rust_icu_udat is a higher-level crate than rust_icu_ucal, it is wrong for tests in rust_icu_ucal to require a loop back. So I kind of side with the crates.io objecting in the end; even though strictly speaking dev deps could be treated separately.

In retrospect, I see that my review recommendation to use date parsing for these few tests have caused this loop back. I wasn't aware that this would be an issue.

Would it be very horrible to lift these tests into rust_icu_udat, thus removing the dependency back-link? Yes, we'd be testing UCalendar elsewhere, but it's probably better than fiddling with the release process.

It seems like a better option compared to moving tests to a different crate, since test are still coupled with one of the two crates that are effectively under test. WDYT?

from rust_icu.

kpozin avatar kpozin commented on May 24, 2024

Could we just avoid the UDateFormat dependency and go back to using hard-coded timestamps with comments?

from rust_icu.

filmil avatar filmil commented on May 24, 2024

Could we just avoid the UDateFormat dependency and go back to using hard-coded timestamps with comments?

Yes, that'd work too. Feel free to make a pull request to that effect. I'll remove #101 .

from rust_icu.

filmil avatar filmil commented on May 24, 2024

One more thing: is there a way to configure cargo to alert us to such dep cycles?

from rust_icu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.