Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shellgen: delete flake.lock if flake.nix changes #2388

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Commits on Oct 28, 2024

  1. shellgen: delete flake.lock if flake.nix changes

    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 committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    3cb6168 View commit details
    Browse the repository at this point in the history