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

Use Cargos fingerprint data to trim to only install rust versions #14

Merged
merged 3 commits into from
Jan 3, 2019

Conversation

Eh2406
Copy link
Collaborator

@Eh2406 Eh2406 commented Dec 20, 2018

This is the PR discussed in #6 (comment), specifically it used cargos fingerprint files and folder structure to let you cargo +stable build && cargo +nightly build && rustup toolchain remove nightly && cargo sweep -i and it will remove all the files related to nightly leaving you with the same files as if you had only run cargo +stable build. (Witch a lot of peepal need to clean the cache folder on CI when nightly updates. like rust-lang/crates.io#1578)

@holmgr
Copy link
Owner

holmgr commented Dec 21, 2018

The code looks very good, however, it seems to be crashing on Linux environment. Is rustup not available on Travis for Linux systems I wonder? Or is it something obvious I am missing?

@Eh2406
Copy link
Collaborator Author

Eh2406 commented Dec 21, 2018

Looks like rustup is available in travisce, maybe it has something to do with cross? If we can't get the tests to work on CI, we can just remove them, they are not testing very much. (it makes me feel dirty to say it.)

bors added a commit to rust-lang/cargo that referenced this pull request Dec 21, 2018
don't write a an incorrect rustc version to the fingerprint file

In making holmgr/cargo-sweep#14 I noted that some fingerprint files related to build scripts report being built with a rustc that hashes to "0". To work around this I just marked them as still being needed, even though no rustc that hashes to "0" is currently installed.

I believe that this PR just filles in the correct info for the build script fingerprints. This makes it possible for outside tools to more reliably clean up after cargo, at basically no cost.
@ehuss Thanks again for the help.
@Eh2406
Copy link
Collaborator Author

Eh2406 commented Dec 21, 2018

I removed the tests. They were only testing that reading the data from rustup was not crashing. And that is not a particularly finicky part of the code.

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 this pull request may close these issues.

2 participants