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

Option to skip cleaning of some specified src crates in registry/src #100

Closed
lrubasze opened this issue Jan 4, 2023 · 4 comments
Closed

Comments

@lrubasze
Copy link

lrubasze commented Jan 4, 2023

In theory cache should be enough to recreate sources and reduce the build time.

However, there are some crates, eg. librocksdb-sys that do not benefit from that. Restoring sources from cache is not enough.
(more details ci: enable 'librocksdb-sys' to be able to be properly cached)

How about addressing this problem by checking if some path from cache-directories belongs to registry/src and prevent this path from removal.
Or maybe some additional config param with list of src entries to keep?

lrubasze added a commit to radixdlt/radixdlt-scrypto that referenced this issue Jan 6, 2023
At the moment Swatinem/rust-cache removes registr/src before caching.
details: Swatinem/rust-cache#100
lrubasze added a commit to radixdlt/radixdlt-scrypto that referenced this issue Jan 6, 2023
At the moment Swatinem/rust-cache removes registr/src before caching.
details: Swatinem/rust-cache#100
lrubasze added a commit to radixdlt/radixdlt-scrypto that referenced this issue Jan 6, 2023
At the moment Swatinem/rust-cache removes registr/src before caching.
details: Swatinem/rust-cache#100
@Oppen
Copy link

Oppen commented Jan 31, 2023

Caching all of target can sometimes lead to errors as well, for example when you run test coverage with the likes of llvm-cov. Granted, you could clean the output before the post steps run, but it would be cool to make it easier to express this has cache significance other than with comments.

@lrubasze
Copy link
Author

lrubasze commented Feb 1, 2023

@Oppen thanks for reply.
Correct me if I am wrong but I suppose the issue you described refers to caching of target in general, not necessarily in relation to the issue I have described. Unless I am not entirely getting your point.

@Oppen
Copy link

Oppen commented Feb 1, 2023

Oh, you're right. I misinterpreted the current issue as being related to which subfolders were cached.

@Swatinem
Copy link
Owner

Swatinem commented Aug 2, 2023

Maybe just a half-solution, but I excluded -sys crates from the .cargo/registry/src cleanup in f6987ea

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