Skip to content

Fix issue #13018, sourceInfo strict in outputs#13026

Merged
Mic92 merged 3 commits intoNixOS:masterfrom
roberth:issue-13018
Apr 15, 2025
Merged

Fix issue #13018, sourceInfo strict in outputs#13026
Mic92 merged 3 commits intoNixOS:masterfrom
roberth:issue-13018

Conversation

@roberth
Copy link
Member

@roberth roberth commented Apr 15, 2025

Motivation

Fixes a subtle regression problem, which applies to path inputs only, which were unusable before #10089

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth roberth requested a review from edolstra as a code owner April 15, 2025 07:35
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Apr 15, 2025
@roberth roberth added the flakes label Apr 15, 2025
@Mic92
Copy link
Member

Mic92 commented Apr 15, 2025

@zimbatm is this the issue you had?

roberth added 3 commits April 15, 2025 13:22
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.
@Mic92 Mic92 enabled auto-merge April 15, 2025 11:23
@Mic92 Mic92 added the backport 2.28-maintenance Automatically creates a PR against the branch label Apr 15, 2025
@Mic92 Mic92 merged commit 99a16c5 into NixOS:master Apr 15, 2025
12 checks passed
@roberth
Copy link
Member Author

roberth commented Apr 15, 2025

Fwiw I don't think the input parent relation has to align with directory parent relation for this problem to occur, i.e. the flakes in the test case could switch locations and the behavior would be the same.
(corollary of "subflakes don't exist - it's all relative path flakes")

edolstra added a commit that referenced this pull request Apr 15, 2025
…3026

Fix issue #13018, `sourceInfo` strict in `outputs` (backport #13026)
MattSturgeon pushed a commit to MattSturgeon/flake-compat that referenced this pull request May 19, 2025
MattSturgeon pushed a commit to MattSturgeon/flake-compat that referenced this pull request May 19, 2025
MattSturgeon pushed a commit to MattSturgeon/flake-compat that referenced this pull request May 19, 2025
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.

(cherry picked from commit NixOS/nix@2109a5a)
(cherry picked from PR NixOS/nix#13026)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.28-maintenance Automatically creates a PR against the branch flakes with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sourceInfo is strict in parent flake outputs

2 participants