-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Doesn't seem to cache crates installed via cargo install
#59
Comments
Perhaps because the automatic key does not include |
I'm trying to read the code and understand how saving and restoring What I expect is that if in my job I
But I don't see that. What I see in the 'run' logs is that the crate is compiled (and perhaps also downloaded, don't remember) again. Is this by design, please? Also, I don't see a test suite, so that doesn't make me confident in contributing. |
Because the globally installed binary crates can be huge, and saving/loading them from cache adds considerable overhead in time and size. As they are part of the runner environment, the assumption is that they will be repopulated on every run, though that does not necessarily work for self hosted runners. |
I'd like to better understand this assumption, please. How about we start with "they are part of the runner environment". I'm not sure I understand what you mean by that. Do GitHub Actions hosted runners have prepopulated |
Yes, or maybe its the toolchain action that pre-populates Just removing all the pre-populated files however can cause issues like #16 |
Yeah... The lack of an |
This is just for testing Swatinem/rust-cache#59.
Hey there, I've noticed the same problem, but in the context of a crate which I install with First, I can confirm that there are binaries in $ ls ~/.cargo/bin
bindgen
cargo
cargo-audit
cargo-clippy
cargo-fmt
cargo-miri
cargo-outdated
cbindgen
clippy-driver
rls
rust-gdb
rust-gdbgui
rust-lldb
rustc
rustdoc
rustfmt
rustup This is from a test run where As for my situation with $ cargo install --path i18n-helpers --locked command to something like $ cd i18n-helpers && cargo build and then I will execute the binaries from the Doing this will also nicely work around rust-lang/cargo#7169 and actually give me a reproducible build ✨ |
There are two problems with `cargo install --locked --path`: - `cargo install --path` does not actually honor the lock file, see rust-lang/cargo#9289. - `cargo install --path` is not cached, see Swatinem/rust-cache#59.
There are two problems with using `cargo install --locked --path`: - `cargo install --path` does not actually honor the lock file, see rust-lang/cargo#9289. - `cargo install --path` is not cached, see Swatinem/rust-cache#59. We should be able to work around them by using `cargo build` instead. We don’t actually need a release build for the i18n-helpers, so this will also be a little bit faster on the initial build.
There are two problems with using `cargo install --locked --path`: - `cargo install --path` does not actually honor the lock file, see rust-lang/cargo#9289. - `cargo install --path` is not cached, see Swatinem/rust-cache#59. We should be able to work around them by using `cargo build` instead. We don’t actually need a release build for the i18n-helpers, so this will also be a little bit faster on the initial build.
Hi @Swatinem, do you have a suggestion for working around this? I ran into a problem with the action saying That is, I'm installing From what I see, binaries in |
That is possible indeed, the |
Okay, that explains it 😄 Hashing the files before/after would be great, but that might of course incur some unacceptable overhead. |
This should be fixed by #137 |
@Swatinem Ok to close this one? |
No description provided.
The text was updated successfully, but these errors were encountered: