Skip to content

Allow opting out of caching $CARGO_HOME/bin.#216

Merged
Swatinem merged 7 commits intoSwatinem:masterfrom
benjyw:cache-bin
Dec 10, 2024
Merged

Allow opting out of caching $CARGO_HOME/bin.#216
Swatinem merged 7 commits intoSwatinem:masterfrom
benjyw:cache-bin

Conversation

@benjyw
Copy link
Contributor

@benjyw benjyw commented Oct 30, 2024

This prevents wiping the bin directory, which is harmful
on long-lived self-hosted runners, as it will nuke
rustup, rustc, cargo and so on.

Prevents wiping the bin directory, which is harmful for
self-hosted runners.
Fix a few whitespace nits.
This was done with:

`ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist`

Which I hope is correct.
@benjyw
Copy link
Contributor Author

benjyw commented Dec 8, 2024

Thanks for the review! I tweaked slightly, handled the merge conflict, and regenerated the files under dist/, which I hope I did correctly. I used:

ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist

Is that correct?

@Swatinem
Copy link
Owner

Swatinem commented Dec 9, 2024

That didn’t seem to have been correct.
I think its okay if you remove the last commit regenerating the file. I will then merge without the dist update, and I can do the rest locally before I tag a new release.

@benjyw
Copy link
Contributor Author

benjyw commented Dec 9, 2024

Done, thanks!

@Swatinem Swatinem merged commit e8e63cd into Swatinem:master Dec 10, 2024
cburroughs added a commit to pantsbuild/pants that referenced this pull request Oct 5, 2025
With Swatinem/rust-cache#216 we should no longer
need to diverge from upstream.
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