-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Cargo and some dependencies are compiled twice on CI #48223
Labels
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
Comments
I think I brought up this before, and as a result you closed the issue at Cargo side. |
Cargo is working as intended, our CI is not |
So this is rust-lang/cargo#4048. I think this is definitely a feature worth implement in Cargo. |
alexcrichton
added a commit
to alexcrichton/derive-new
that referenced
this issue
Mar 1, 2018
In tracking down the cause of rust-lang/rust#48223 I found that the `syn` crate was compiled twice and with different features than the ones that Cargo activated. It turns out that the RLS pulls in this crate which depends on `syn`, and this crate enabled the `full` feature in `syn` where a standalone build of Cargo didn't activate such a feature. Consequently this means that when Cargo was compiled for the RLS and for itself it was compiled twice! I initially started out by removing the dependency on the `full` feature in this crate (hurray faster compiles too!) but ended up updating to syn 0.12 as well which is the updated version that works better with spans and such. I've also done some reorganization of the tests cases to hopefully be more amenable to CI as well, but let me know if any of it looks odd!
I think this will be fixed with nrc/derive-new#28 and #48642 |
Fixed in #48642 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed on the most recently timed out mipsel dist builder that Cargo, the library, was compiled twice. This is no small chunk of time!
Investigating it looks like a number of libraries were compiled at least twice, including: cargo, chrono, crates-io, docopt, env_logger, failure_derive, failure, num, serde_derive_internals, serde_derive, synstructure.
My guess is that the feature selection is changing for deeply nested crates like
syn
ornum
between top-level targets like the RLS and Cargo. We should make sure that the feature selection is the same so the dependencies can be shared, and then we should probably add a check to CI that Cargo isn't compiled twice.The text was updated successfully, but these errors were encountered: