Allow meta.problems while preventing internal use of certain kinds#533376
Conversation
Makes future changes easier
This ensures that external tooling can also process the problems, and helps users with debugging.
165c2fd to
889b69f
Compare
|
I'm concerned that the attribute filtering logic being run when not filtering anything will be a performance loss outside of CI. I can test this later. |
22240a2 to
6f96bad
Compare
6f96bad to
8311277
Compare
|
Got it working, but as I feared, this heavily regresses CI performance.
Feel free to reproduce. Tested by:
diff --git a/pkgs/applications/misc/cubocore-packages/coregarage/default.nix b/pkgs/applications/misc/cubocore-packages/coregarage/default.nix
index 74b5bbd5a7cf..7d7a3d94dc2a 100644
--- a/pkgs/applications/misc/cubocore-packages/coregarage/default.nix
+++ b/pkgs/applications/misc/cubocore-packages/coregarage/default.nix
@@ -39,6 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "Settings manager for the C Suite";
mainProgram = "coregarage";
+ problems.removal.message = "some message";
homepage = "https://gitlab.com/cubocore/coreapps/coregarage";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
I'd like to try to lower this regression, as CI runs on every single PR. |
|
Thanks for testing!
So long as total CI time (prepare → unlock) is in the same ballpark (minutes), I don't see Reducing the performance hit would be nice, of course, but it could be done in a follow-up if needed. |
Looks like CI's eval is actually what determins the overall CI run time. If we assume1 your observed 20% increase in CPU time is representative and applies directly to eval job runtime, it would add around 30s to the current ~3m job.
Surprisingly, we actually use the untrusted (PR branch's) CI implementation to orchestrate the eval: nixpkgs/.github/workflows/eval.yml Line 206 in a12b470 So, that should mean that this PR's eval run is already using this PR's changes. Looking at this PR's latest run, it's roughly the same overall job times as other recent PRs (example run). Both those runs have 3m20s longest eval job, and 5m40s total workflow run; no observable difference.2 I'm minded to merge this and see whether workflow/job time changes and how effectively it handles If we do observe significant slowdown, we can always revert. If we observe a small slowdown, I personally won't be too concerned. Footnotes |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Early performance seems reasonable. I haven't looked for PR runs where the base branch definitely includes this PR, but just selecting a few recent runs' total times at random: * This run definitely used this PR |
|
Successfully created backport PR for |
|
Follow-up to allow internally disallowed packages to depend on other such ones: #537051 |
|
Looking at https://github.com/NixOS/nixpkgs/actions/runs/28551752960/job/84650353939#step:7:443?pr=522364 the abort shows up e.g. when inheriting a We probably want more of an "abort on instantiate" behaviour, e.g. a |
This allows setting
meta.problems.removal(which gives a warning by default) on Nixpkgs packages, while also preventing Nixpkgs from depending on packages that have a removal or deprecated problem.This is implemented by doing more or less the same thing that
aliases.nixdoes: Making such packages internally unavailable from the Nixpkgs evaluation, meaning they can't be used as dependencies anymore.Best reviewed commit-by-commit
Closes #523712
Things done
quickTest)meta.problems.removal.message = "...";topkgs.CuboCore.coregaragenix-build ci -A eval.singleSystem --arg quickTest trueCuboCore.coregarageas a dependency topkgs.OVMFnix-build ci -A eval.singleSystem --arg quickTest true, with the following error message: