Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis: Some components might not cargo test because dependencies are too recent #468

Open
JohanLorenzo opened this issue May 6, 2016 · 4 comments

Comments

@JohanLorenzo
Copy link
Contributor

Spotted in this job and that one. That's also reproducible locally.

STR

  1. cd components/taxonomy
  2. cargo test

Results

aster 0.16.0 can't compile because it's meant to be built against a rustc more recent than nightly-2016-04-10.

Short term solution

#465 will rust up, so the problem will go away, until next time.

Root causes

This problem is due to the accumulation of these causes:

  • cargo test doesn't the tests of components (like described in Components tests are not run with cargo test at the root of foxbox #449).
  • by default, ^ is implied when defining version of dependencies (e.g.: serde = "0.7.0" is equivalent to serde = "^0.7.0" and not serde = "= 0.7.0")
  • components are not run in the same workspace than foxbox. In other words, we create another Cargo.lock. That's why foxbox is able to compile globally, but not one of its component.

Long term solutions?

  • Pin every single version of libraries (aka, "put an = for every dependency in Cargo.toml"). I tried it locally, and I still didn't manage to compile taxonomy.
  • Store Cargo.lock for every component in git. This will be an issue when taxonomy is out on crates.io. People might face the same type of compiling error, without us knowing. They'll also have to freeze their Cargo.lock to comply with the one we have.
  • Wait until RFC: Add workspaces to Cargo rust-lang/rfcs#1525 is implemented in cargo.

None of them seems actionable in a short term perspective. @fabricedesre @julienw do you see something else that we could do?

@fabricedesre
Copy link
Collaborator

I don't have any other idea so far... I hoped that the cargo update job would help us catch these issue preventively.

@julienw
Copy link
Contributor

julienw commented May 9, 2016

I think we actually need to use "=" for those dependencies that are problematic (eg: serde), but not all of them.

About clippy that's also problematic, maybe we should have it in a feature and make it optional.

@fabricedesre
Copy link
Collaborator

using = is a problem if you also pull the same crate with a different version from dependencies. So please not.

What's the problem with clippy?

@julienw
Copy link
Contributor

julienw commented May 9, 2016

Same problem than serde: it breaks every then and now when it is updated for a newer rust but our rust is not (for example).

I know the issue that comes from "=" but I don't have better options right now. If we keep it for the 1 or 2 problematic dependencies this is likely manageable. We can also use ">= XXX < YYY" and update YYY when we try it and see it still builds. But this is a lot of work I'm not sure we want to tackle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants