Skip to content

Devenv update failed - lock file version 4 requires -Znext-lockfile-bump #1778

@Ian2020

Description

@Ian2020

Describe the bug
When I tried to update devenv today from 1.3.1 to latest the process failed.

To reproduce
devenv update devenv

Make sure to include full logs and what you expected to happen (below)

Version
1.4.1

• Updating devenv.lock with input devenv ...
warning: unknown experimental feature 'repl-flake'
warning: updating lock file '/home/ian/ledger/devenv.lock':
• Updated input 'devenv':
    'github:cachix/devenv/24f0aac5d4798899a0a739ea2c13396850fad2a8?dir=src/modules' (2024-11-21)
  → 'github:cachix/devenv/31420fd60aa7a668cdfe179b74f341a59150b1e7?dir=src/modules' (2025-03-17)
• Added input 'git-hooks':
    'github:cachix/git-hooks.nix/ea26a82dda75bee6783baca6894040c8e6599728' (2025-03-18)
• Added input 'git-hooks/flake-compat':
    'github:edolstra/flake-compat/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec' (2024-12-04)
• Added input 'git-hooks/gitignore':
    'github:hercules-ci/gitignore.nix/637db329424fd7e46cf4185293b9cc8c88c95394' (2024-02-28)
• Added input 'git-hooks/gitignore/nixpkgs':
    follows 'git-hooks/nixpkgs'
• Added input 'git-hooks/nixpkgs':
    follows 'nixpkgs'
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/3308484d1a443fc5bc92012435d79e80458fe43c' (2024-11-19)
  → follows 'git-hooks'
• Removed input 'pre-commit-hooks/flake-compat'
• Removed input 'pre-commit-hooks/gitignore'
• Removed input 'pre-commit-hooks/gitignore/nixpkgs'
• Removed input 'pre-commit-hooks/nixpkgs'
• Removed input 'pre-commit-hooks/nixpkgs-stable'
✔ Updating devenv.lock with input devenv in 3.04s
direnv: loading ~/ledger/.envrc
direnv: loading https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc (sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0=)
direnv: using devenv
direnv: .envrc changed, reloading
• Building shell ...
direnv: ([/usr/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up.
• Using Cachix: devenv
error: builder for '/nix/store/p6jhdziw55ni0hvniqxkqlc1ypnj8cgw-devenv-1.4.2.drv' failed with exit code 101;
       last 18 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/wb91d2qldrm4ybq44jg4qrr6mhw3yfn7-source
       > source root is source
       > Executing cargoSetupPostUnpackHook
       > Finished cargoSetupPostUnpackHook
       > Running phase: patchPhase
       > Executing cargoSetupPostPatchHook
       > Validating consistency between /build/source/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
       > Finished cargoSetupPostPatchHook
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > Executing cargoBuildHook
       > ++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/cc CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_CC=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/cc HOST_CXX=/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/c++ cargo build -j 4 --target x86_64-unknown-linux-gnu --frozen --profile release -p devenv-tasks
       > error: failed to parse lock file at: /build/source/Cargo.lock
       >
       > Caused by:
       >   lock file version 4 requires `-Znext-lockfile-bump`
       For full logs, run 'nix log /nix/store/p6jhdziw55ni0hvniqxkqlc1ypnj8cgw-devenv-1.4.2.drv'.
error:
       error: 1 dependencies of derivation '/nix/store/z5bry2wia60k5bl0j08qx4f98y3xpj22-devenv-shell-env.drv' failed to build
✖ Building shell in 215s
Error:   × Command `/nix/store/mls2ij7dj0wby10lnpbl6xpnqid4rax1-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-
  │ features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs
  │ 2 --option eval-cache false --option extra-substituters https://devenv.cachix.org --option extra-trusted-
  │ public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= print-dev-env --profile /home/ian/
  │ ledger/.devenv/gc/shell -vv --log-format internal-json` failed with with exit code 1

direnv: failed to build the devenv environment. devenv.nix may contain errors. see above.

I see a reference to devenv 1.4.2 in the logs above but thought 1.4.1 was latest?

My devenv.yaml is simply:

inputs:
  nixpkgs:
    url: github:cachix/devenv-nixpkgs/rolling

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions