Skip to content

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Oct 28, 2024

Fix a bug where .devbox/gen/flake gets locked on old versions of .devbox/gen/flake/glibc-patch by deleting the flake.lock file.

We only delete the lock file when the generated flake changes so that Nix isn't forced to re-evaluate it every time.

The repro steps are:

  1. Add a package that gets auto-patched (devbox add [email protected]).
  2. .devbox/gen/flake gets locked on the patch flake.
  3. Change the patched package (devbox add [email protected]).
  4. The new patch flake isn't used because of .devbox/gen/flake/flake.lock. Instead, the old version is used (from the Nix store).

Fixes #2316.
Fixes #2370.

Fix a bug where `.devbox/gen/flake` gets locked on old versions of
`.devbox/gen/flake/glibc-patch` by deleting the `flake.lock` file.

We only delete the lock file when the generated flake changes so that
Nix isn't forced to re-evaluate it every time.

The repro steps are:

1. Add a package that gets auto-patched (`devbox add [email protected]`).
2. `.devbox/gen/flake` gets locked on the patch flake.
3. Change the patched package (`devbox add [email protected]`).
4. The new patch flake isn't used because of
   `.devbox/gen/flake/flake.lock`. Instead, the old version is used
  (from the Nix store).

Fixes #2316.
Fixes #2370.
@gcurtis gcurtis requested review from mikeland73 and savil October 28, 2024 20:07
@gcurtis gcurtis merged commit 2f38449 into main Oct 28, 2024
29 checks passed
@gcurtis gcurtis deleted the gcurtis/flake-lock branch October 28, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[email protected] error creating shell (NixOS) python3 on macOS explodes

2 participants