From d766035d6544bb385b307c5de6c4bb5ed08c91cd Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 30 Aug 2025 15:43:47 +0200 Subject: [PATCH] ci/eval/compare: only check changed attrpaths It makes no sense to check newly added attrpaths for maintainers on the target branch - by definition these attrpaths won't exist, yet. We can avoid falling back to `null` for these etc. (cherry picked from commit e88dd3a8b278ffe22b7de999183220beeda05a54) --- ci/eval/compare/default.nix | 3 ++- ci/eval/compare/maintainers.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index b338d8f82d6d..cfd9b78510d0 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -77,6 +77,7 @@ let # - values: lists of `packagePlatformPath`s diffAttrs = builtins.fromJSON (builtins.readFile "${combinedDir}/combined-diff.json"); + changedPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.changed; rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.rebuilds; removedPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.removed; @@ -116,7 +117,7 @@ let ); maintainers = callPackage ./maintainers.nix { } { - changedattrs = lib.attrNames (lib.groupBy (a: a.name) rebuildsPackagePlatformAttrs); + changedattrs = lib.attrNames (lib.groupBy (a: a.name) changedPackagePlatformAttrs); changedpathsjson = touchedFilesJson; removedattrs = lib.attrNames (lib.groupBy (a: a.name) removedPackagePlatformAttrs); inherit byName; diff --git a/ci/eval/compare/maintainers.nix b/ci/eval/compare/maintainers.nix index ec3dc2dcc837..00a47e7c494d 100644 --- a/ci/eval/compare/maintainers.nix +++ b/ci/eval/compare/maintainers.nix @@ -28,7 +28,7 @@ let }) (changedattrs ++ removedattrs); attrsWithPackages = builtins.map ( - pkg: pkg // { package = lib.attrsets.attrByPath pkg.path null pkgs; } + pkg: pkg // { package = lib.getAttrFromPath pkg.path pkgs; } ) enrichedAttrs; attrsWithMaintainers = builtins.map (