Set strictDeps=true on our top level packages #192

Open
abonerib wants to merge 12 commits from enableStrictDeps into master
Collaborator
https://jungle.bsc.es/git/rarias/bscpkgs/pulls/12
abonerib changed title from WIP: Set strictDeps=true on our top level packages to Set strictDeps=true on our top level packages 2025-10-08 12:33:00 +02:00
Owner

I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve?

I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve?
Author
Collaborator

I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve?

We already discussed it bscpkgs: rarias/bscpkgs#10 (comment)

TL;DR: I think it's preferable to enforce strictDeps so our derivations are correct before wasting time and resources cross-compiling something that we could already have known would fail beforehand.

> I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve? We already discussed it bscpkgs: https://jungle.bsc.es/git/rarias/bscpkgs/pulls/10#issuecomment-4209 TL;DR: I think it's preferable to enforce `strictDeps` so our derivations are correct before wasting time and resources cross-compiling something that we could already have known would fail beforehand.
Owner

I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve?

We already discussed it bscpkgs: rarias/bscpkgs#10 (comment)

TL;DR: I think it's preferable to enforce strictDeps so our derivations are correct before wasting time and resources cross-compiling something that we could already have known would fail beforehand.

I have two issues with strictDeps:

  1. Is not well documented so I don't know if it does only what you think it does. This can be resolved by reviewing the relevant parts of the stdenv machinery (and ideally having some notes for the future).
  2. I don't like auto-enabling this when is not done in upstream yet (this is partially caused by the point above). Maybe a less risky option is to fail to evaluate if you forgot to set it either to true of false, so you have to explictly set it in all derivations.

If you think it is still useful to have it, I would need to review how it works internally. If that point is clear, I won't oppose enabling it for those derivations that you have worked on. Not sure if we want to enable it for all where is not set.

> > I was planning to add another job to the CI to run the cross compilation target. Wouldn't that cover what this patch is trying to solve? > > We already discussed it bscpkgs: https://jungle.bsc.es/git/rarias/bscpkgs/pulls/10#issuecomment-4209 > > > TL;DR: I think it's preferable to enforce `strictDeps` so our derivations are correct before wasting time and resources cross-compiling something that we could already have known would fail beforehand. I have two issues with strictDeps: 1. Is not well documented so I don't know if it does only what you think it does. This can be resolved by reviewing the relevant parts of the stdenv machinery (and ideally having some notes for the future). 2. I don't like auto-enabling this when is not done in upstream yet (this is partially caused by the point above). Maybe a less risky option is to fail to evaluate if you forgot to set it either to true of false, so you have to explictly set it in all derivations. If you think it is still useful to have it, I would need to review how it works internally. If that point is clear, I won't oppose enabling it for those derivations that you have worked on. Not sure if we want to enable it for all where is not set.
Author
Collaborator
  1. Is not well documented so I don't know if it does only what you think it does. This can be resolved by reviewing the relevant parts of the stdenv machinery (and ideally having some notes for the future).

I have taken a look in stdenv and there the two takeaways are:

  1. I don't like auto-enabling this when is not done in upstream yet (this is partially caused by the point above). Maybe a less risky option is to fail to evaluate if you forgot to set it either to true of false, so you have to explictly set it in all derivations.

I think that explicitly setting it to false could also have unintended consequences (see above).

If you think it is still useful to have it, I would need to review how it works internally. If that point is clear, I won't oppose enabling it for those derivations that you have worked on. Not sure if we want to enable it for all where is not set.

I agree that adding it by default magically to all our packages is a bit of a hack. Maybe we can add it as a ci target, but that would mean a lot of rebuilds.

> 1. Is not well documented so I don't know if it does only what you think it does. This can be resolved by reviewing the relevant parts of the stdenv machinery (and ideally having some notes for the future). I have taken a look in stdenv and there the two takeaways are: - When cross-compiling, by default it is enabled: https://github.com/NixOS/nixpkgs/blob/f00b180ed496b11337983fe4b0b979419cb3e472/pkgs/stdenv/generic/make-derivation.nix#L225 - This has the unfortunate consequence that setting `strictDeps = false` will affect cross compilation (I may be wrong) - The actual logic is in the stdenv setup.sh: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L850 - There are only 3 uses of strictDeps. From what I could understand: - 2 of them related to skip adding things to the HOST_PATH and - the other skips running setup hooks from activated packages. The setup hooks could do anything, so who knows what the consequences are. > 2. I don't like auto-enabling this when is not done in upstream yet (this is partially caused by the point above). Maybe a less risky option is to fail to evaluate if you forgot to set it either to true of false, so you have to explictly set it in all derivations. I think that explicitly setting it to false could also have unintended consequences (see above). > If you think it is still useful to have it, I would need to review how it works internally. If that point is clear, I won't oppose enabling it for those derivations that you have worked on. Not sure if we want to enable it for all where is not set. I agree that adding it by default magically to all our packages is a bit of a hack. Maybe we can add it as a ci target, but that would mean a lot of rebuilds.
abonerib changed target branch from master to upgrade/25.11 2025-12-09 15:17:40 +01:00
rarias changed target branch from upgrade/25.11 to master 2026-01-20 13:51:32 +01:00
rarias added 15 commits 2026-01-20 13:51:32 +01:00
Moved from llvmPackages_latest.tools.bintools to
llvmPackages_latest.bintools
The buildPythonPackage and buildPythonApplication functions now
  require an explicit format attribute. Previously the default format
  used setuptools and called setup.py from the source tree, which is
  deprecated. The modern alternative is to configure pyproject = true
  with build-system = [ setuptools ].
See: https://github.com/NixOS/nixpkgs/pull/437723
The option 'systemd.watchdog.runtimeTime' has been renamed to
'systemd.settings.Manager.RuntimeWatchdogSec'.
This reverts 26f52aa27d
nixseparatedebuginfod has been replaced by nixseparatedebuginfod2
Mark mcxx as broken and remove from package list
All checks were successful
CI / build:cross (pull_request) Successful in 8s
CI / build:all (pull_request) Successful in 16s
1d3bda33a0
Instead of running the papi_version binary, use the
builtin version check from pkg-config.
Fix openmp buildInputs
All checks were successful
CI / build:cross (pull_request) Successful in 49m18s
CI / build:all (pull_request) Successful in 57m9s
755e6dd1a7
abonerib force-pushed enableStrictDeps from 755e6dd1a7 to 1cb632a170 2026-01-21 12:43:58 +01:00 Compare
abonerib force-pushed enableStrictDeps from 1cb632a170 to 61ed93c951 2026-01-21 12:46:25 +01:00 Compare
abonerib added 1 commit 2026-01-21 15:11:49 +01:00
Do not force derviation inputs, use booleans instead
Some checks failed
CI / build:all (pull_request) Failing after 4s
CI / build:cross (pull_request) Failing after 4s
fb653b7d98
abonerib force-pushed enableStrictDeps from fb653b7d98 to 0ac3d3e515 2026-01-21 15:13:36 +01:00 Compare
abonerib force-pushed enableStrictDeps from 0ac3d3e515 to 9c6f2e0097 2026-01-21 15:16:10 +01:00 Compare
Some checks failed
CI / build:cross (pull_request) Successful in 8s
CI / build:all (pull_request) Failing after 35m38s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin enableStrictDeps:enableStrictDeps
git checkout enableStrictDeps
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/jungle#192