mirror of
https://github.com/Swatinem/rust-cache
synced 2025-06-19 06:43:41 +00:00
explicitly close dir handles, add more logging, cleanups
This commit is contained in:
parent
213334cd98
commit
be4be3720d
5 changed files with 217 additions and 148 deletions
|
@ -2,6 +2,8 @@ import path from "path";
|
|||
|
||||
import { getCmdOutput } from "./utils";
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
||||
|
||||
export class Workspace {
|
||||
constructor(public root: string, public target: string) {}
|
||||
|
||||
|
@ -17,7 +19,7 @@ export class Workspace {
|
|||
if (pkg.manifest_path.startsWith(this.root)) {
|
||||
continue;
|
||||
}
|
||||
const targets = pkg.targets.filter((t) => t.kind[0] === "lib").map((t) => t.name);
|
||||
const targets = pkg.targets.filter((t) => t.kind.some((kind) => SAVE_TARGETS.has(kind))).map((t) => t.name);
|
||||
packages.push({ name: pkg.name, version: pkg.version, targets, path: path.dirname(pkg.manifest_path) });
|
||||
}
|
||||
} catch {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue