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

Add option to not use Cargo.lock hash #70

Open
yonathan06 opened this issue Aug 14, 2022 · 4 comments
Open

Add option to not use Cargo.lock hash #70

yonathan06 opened this issue Aug 14, 2022 · 4 comments

Comments

@yonathan06
Copy link

Is there a way to not include the Cargo.toml/Cargo.lock (or any file) hash in the cache key?

I have a build workflow that is triggered on a new version, the the Cargo.toml/Cargo.lock are always different between builds, and so the cache key, so it is ineffective for my use case, is there a way to disable it?

@rekby
Copy link

rekby commented Aug 17, 2022

Is shared-key option solved your task?

@yonathan06
Copy link
Author

shared-key adds the string to the key, but doesn't remove the hash

@Swatinem
Copy link
Owner

Currently there is no way to completely disable this part of the key. But it shouldn’t be such a big problem either, as it falls back to the key prefix without the Cargo.lock portion and reuses caches anyway after cleaning them.

@yonathan06
Copy link
Author

Does it also drop Cargo.toml hash as well? because I update the version of the package, so the hash definitely changes

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

No branches or pull requests

3 participants