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

100% cache misses when using `cargo install --git` #148

Open
lilianmoraru opened this Issue Jul 9, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@lilianmoraru

lilianmoraru commented Jul 9, 2017

I ran this command 3 times:

time RUSTC_WRAPPER="/home/lilian/.cargo/bin/sccache" RUSTFLAGS="-C target-cpu=native" cargo +nightly install --git https://github.com/BurntSushi/ripgrep.git --force --features 'simd-accel avx-accel'

and every time it results in 100% cache misses.

My guess now is that when using --git, it downloads the projects into a temporary folder, this way the paths change every time.

I was hoping that sccache will share the compiled crates, so, when compiling other projects, it will pick these up(from a previous ripgrep compilation for example).

Could this be solved or there is nothing that can be done here?

@alexcrichton

This comment has been minimized.

Collaborator

alexcrichton commented Jul 9, 2017

This is likely due to Cargo using a tmpdir so path names are changing, and the hash right now may accidentally include the path name.

@luser

This comment has been minimized.

Member

luser commented Jul 17, 2017

If you run cargo build -v there you should be able to see the actual rustc invocations, which would show where the problem is. I think cargo passes the full path to some things on the commandline, and sccache doesn't try to filter those out currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment