mirror of
https://github.com/Swatinem/rust-cache
synced 2026-06-10 10:37:14 +00:00
Merge branch 'master' of https://github.com/Swatinem/rust-cache
This commit is contained in:
commit
1fe0a60026
19 changed files with 81 additions and 55 deletions
12
dist/restore.js
vendored
12
dist/restore.js
vendored
|
|
@ -332343,7 +332343,7 @@ async function exists(path) {
|
|||
}
|
||||
}
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
||||
const SAVE_TARGETS = new Set(["lib", "cdylib", "dylib", "rlib", "staticlib", "proc-macro"]);
|
||||
class Workspace {
|
||||
root;
|
||||
target;
|
||||
|
|
@ -332682,10 +332682,10 @@ function digest(hasher) {
|
|||
async function getCargoBins() {
|
||||
const bins = new Set();
|
||||
try {
|
||||
const { installs } = JSON.parse(await fs$2.readFile(path__default.join(CARGO_HOME, ".crates2.json"), "utf8"));
|
||||
for (const pkg of Object.values(installs)) {
|
||||
for (const bin of pkg.bins) {
|
||||
bins.add(bin);
|
||||
const dir = await fs$2.opendir(path__default.join(CARGO_HOME, "bin"));
|
||||
for await (const dirent of dir) {
|
||||
if (dirent.isFile()) {
|
||||
bins.add(dirent.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -332803,7 +332803,7 @@ async function cleanProfileTarget(profileDir, packages, checkTimestamp = false)
|
|||
}
|
||||
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
|
||||
await rmExcept(profileDir, keepProfile);
|
||||
const keepPkg = new Set(packages.map((p) => p.name));
|
||||
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
|
||||
await rmExcept(path__default.join(profileDir, "build"), keepPkg, checkTimestamp);
|
||||
await rmExcept(path__default.join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);
|
||||
const keepDeps = new Set(packages.flatMap((p) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue