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

CARGO_INCREMENTAL: Cargo should only compile crates incrementally that can be changed by the user #3972

Closed
michaelwoerister opened this issue Apr 28, 2017 · 1 comment · Fixed by #4065

Comments

@michaelwoerister
Copy link
Member

Compiling a crate in incremental mode with an empty cache is often slower than compiling the crate non-incrementally. Also, the generated binary is likely to exhibit worse runtime performance and the IC cache for the crate takes up space on disk. At the same time, having a non-incrementally compiled dependency does not have any detrimental effects on incremental compilation as long as that dependency does not change. For these reasons it makes sense to always compile things coming from crates.io or other external sources in non-incremental mode.

@alexcrichton
Copy link
Member

Sounds reasonable to me!

Such a change would likely go here and have an extra check for path sources. Users can only modify path sources, all others should be frozen in Cargo's cache somewhere.

bors added a commit that referenced this issue May 17, 2017
…lexcrichton

Only compile user-modifiable projects incrementally.

Fixes #3972. Thanks for pointing me to the correct implementation, Alex!

r? @alexcrichton
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

Successfully merging a pull request may close this issue.

2 participants