[repo] Licences: the check covers every crate in Cargo.lock, SPDX rule tests; Fabrica test pipeline
This commit is contained in:
+4
-3
@@ -32,11 +32,12 @@ export function allowed(expr) {
|
||||
}
|
||||
|
||||
function main() {
|
||||
const meta = JSON.parse(execFileSync('cargo', ['metadata', '--format-version', '1', '--locked', '--filter-platform', 'x86_64-pc-windows-msvc'], {
|
||||
// Every package in Cargo.lock (all platforms): a crate that is locked must be listed, whatever it is built for.
|
||||
const meta = JSON.parse(execFileSync('cargo', ['metadata', '--format-version', '1', '--locked'], {
|
||||
cwd: root, maxBuffer: 1 << 28, encoding: 'utf8',
|
||||
}));
|
||||
// Only crates reachable on Windows x64 (the one target of V1), not every lockfile entry of every platform:
|
||||
// with --filter-platform, resolve.nodes lists what the workspace really depends on there.
|
||||
// resolve.nodes lists every package the lockfile resolves (all targets).
|
||||
|
||||
const used = new Set(meta.resolve.nodes.map((n) => n.id));
|
||||
const workspace = new Set(meta.workspace_members);
|
||||
const rows = meta.packages
|
||||
|
||||
Reference in New Issue
Block a user