workflows/eval: fix eval report with formatting changes

The Eval report which tests performance between Nix/Lix versions on
update of `ci/pinned` wrongly returned errors, when only the special
attribute `release-checks` changed. Since this reads in all of Nixpkgs,
it will change with any formatting change that is introduced at the same
time via update of any of `treefmt`'s formatters.
This commit is contained in:
Wolfgang Walther
2025-10-24 15:11:41 +02:00
parent 6d07a3a589
commit e43a84b674

View File

@@ -279,12 +279,11 @@ jobs:
const diff = JSON.parse( const diff = JSON.parse(
readFileSync(path.join(artifact, system, 'diff.json'), 'utf-8'), readFileSync(path.join(artifact, system, 'diff.json'), 'utf-8'),
) )
const attrs = [].concat( const attrs = []
diff.added, .concat(diff.added, diff.removed, diff.changed, diff.rebuilds)
diff.removed, // There are some special attributes, which are ignored for rebuilds.
diff.changed, // These only have a single path component, because they lack the `.<system>` suffix.
diff.rebuilds .filter((attr) => attr.split('.').length > 1)
)
if (attrs.length > 0) { if (attrs.length > 0) {
core.setFailed( core.setFailed(
`${version} on ${system} has changed outpaths!\nNote: Please make sure to update ci/pinned.json separately from changes to other packages.`, `${version} on ${system} has changed outpaths!\nNote: Please make sure to update ci/pinned.json separately from changes to other packages.`,