Skip to content

lockFlake(): When updating a lock, respect the input's lock file#13437

Merged
tomberek merged 1 commit intomasterfrom
respect-transitive-locks
Jul 10, 2025
Merged

lockFlake(): When updating a lock, respect the input's lock file#13437
tomberek merged 1 commit intomasterfrom
respect-transitive-locks

Conversation

@edolstra
Copy link
Copy Markdown
Member

@edolstra edolstra commented Jul 9, 2025

Motivation

For example, if a flake has a lock for a and a/b, and we change the flakeref for a, previously Nix would fetch the latest version of b rather than using the lock for b from a.

Fixes #8976 and probably #6105. Updated version of #8977.

Context


Add 👍 to pull requests you find important.

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

@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Jul 9, 2025
@edolstra edolstra mentioned this pull request Jul 9, 2025
@edolstra edolstra added this to Nix team Jul 9, 2025
@github-project-automation github-project-automation bot moved this to Triage in Nix team Jul 9, 2025
@edolstra edolstra added the backport 2.30-maintenance Automatically creates a PR against the branch label Jul 9, 2025
@edolstra edolstra requested a review from tomberek July 9, 2025 19:46
@edolstra edolstra removed this from Nix team Jul 9, 2025
@tomberek tomberek merged commit 485cbfc into master Jul 10, 2025
26 checks passed
@tomberek tomberek deleted the respect-transitive-locks branch July 10, 2025 04:28
tomberek added a commit that referenced this pull request Jul 10, 2025
…3437

lockFlake(): When updating a lock, respect the input's lock file (backport #13437)
@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2025-07-09-nix-team-meeting-minutes-233/66474/1

@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-31-0-released/68465/1

@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/flake-lock-duplicates-and-transitive-dependencies-why/71174/14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.30-maintenance Automatically creates a PR against the branch 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.

nix flake lock does not lock transitive dependencies correctly

3 participants