github cachix/devenv v2.1

5 hours ago

Bug Fixes

  • Fixed dynamic process port allocation reusing stale eval/build-cache entries without replaying port reservations, which could make parallel devenv up instances both try the same base port (#2779).
  • Fixed exec_if_modified task checks walking the filesystem twice per run.
  • Fixed set: Tried to change the read-only variable "PWD" and "SHLVL" errors in fish after devenv shell reloads.
  • Fixed wrong background color in TUI apps (e.g. neovim) inside devenv shell. Cells the app cleared with a custom background now keep that color instead of falling back to the terminal default.
  • Nested substituter nix-cache-info downloads under "Configuring cachix".
  • Fixed TUI rendering glitches during lock validation, and nested fetch activities (e.g. tarball downloads) under "Validating lock".
  • Fixed TUI freezing while cachix finishes uploading on shell entry. Push progress is now visible during cleanup.
  • Fixed cachix push progress stuck at 0/N. Already-cached paths now count toward progress.
  • Fixed tracked path log lines showing as dot-prefixed rows under "Evaluating shell" in the TUI instead of attaching to the eval activity.
  • Fixed "suspicious ownership" errors when using Nix installed in single-user mode. Nix requires read-only group permissions on outputs (#2751).
  • Fixed hot reload not watching files transitively imported by devenv.nix (e.g. imports = [ ./nested/child.nix ]).
  • Fixed the root devenv.nix being imported twice when devenv.yaml imported a sub-project that also had its own devenv.yaml (#2755).
  • Fixed devenv shell and devenv build failing with path '...drv' is required, but there is no substituter that can build it after the cached derivation was garbage-collected. The stale eval-cache entry is now invalidated when its referenced store paths no longer exist, forcing a re-evaluation that re-materializes the .drv on disk.
  • Fixed hot reload missing file and directory changes that occurred during a build or during the brief gap between watch refreshes. The reload watcher now tracks path state (file/directory/missing) across reload cycles, queues deferred events while a build is in progress, and reconciles drift after rewatching so missed changes still trigger a follow-up rebuild.
  • Fixed MCP server segfault on exit by waiting for the cache init thread to finish before exiting (#2699).
  • Fixed independent oneshot tasks (e.g. devenv:files and devenv:python:virtualenv) running sequentially instead of in parallel, causing unnecessary waterfall delays during devenv shell startup.
  • Fixed nix build failing with E0463: can't find crate for devenv_reload by switching the iocraft [patch.crates-io] entry to the row-level-diff branch, which carries iocraft 0.8.0. The previous cachix branch was stuck at 0.7.18 so the patch no longer applied, leaving two iocraft versions in the dependency graph and causing rustc metadata hash mismatches.
  • Fixed processes.<name>.watch restarting processes multiple times for a single burst of queued file watcher events by draining the watch queue before restart (#2735).
  • Fixed processes.<name>.watch restarting processes on read-only access, directory listing, and metadata-only file events (#2734).
  • Fixed imports overriding the base project's inputs (e.g. inputs.nixpkgs.url) instead of the base config taking precedence (#2728).
  • Fixed Boehm GC "Repeated allocation of very large block" warnings being printed to stderr during devenv shell.
  • Fixed devenv hook not changing directory when cding out of a devenv project. The shell would deactivate but remain in the project directory instead of following the user to the target directory.
  • Fixed devenv hook fish causing infinite recursion / hang when entering a devenv project, because the nested fish -c invocation re-sourced ~/.config/fish/config.fish which re-ran the hook. The nested fish now uses --no-config (#2741).
  • Fixed cachix daemon failing to start because the evaluated store path for the cachix binary was never realized. Now uses the cachix bundled with devenv via PATH, falling back to evaluating cachix.binary only when needed.
  • Fixed warning messages from Nix not being forwarded and displayed during evaluation.
  • Fixed devenv test leaving orphaned processes after test failures by ensuring processes are always stopped before propagating errors.
  • Fixed adding a new input to devenv.yaml causing all existing inputs to be re-fetched instead of only resolving the new one (#2688).
  • Fixed processes.<name>.watch.paths not triggering process restarts because Nix paths were serialized as store paths instead of source directory paths (#2657).
  • Fixed cursor shape escape sequences (DECSCUSR) not being forwarded to the terminal in devenv shell, which caused programs like neovim to not change cursor shape between modes (e.g. block in normal mode, bar in insert mode).
  • Fixed shift+mouse configuration (XTSHIFTESCAPE) not being forwarded to the terminal in devenv shell.
  • Fixed devenv shell hanging indefinitely when exiting the shell during a hot-reload build by interrupting the lingering Nix evaluation on shutdown.
  • Fixed devenv repl broken TUI output and hanging evaluation by adding proper TUI handoff support, showing evaluation progress in the TUI before handing the terminal to the interactive REPL.
  • Fixed Ghostty shell integration not working in devenv shell by sourcing ghostty.bash from the rcfile when GHOSTTY_RESOURCES_DIR is set.
  • Fixed TUI panic when expanding error details containing multi-byte UTF-8 characters (e.g. miette underlines) by using character-based truncation instead of byte-based slicing.
  • Fixed devenv:git-hooks:install in linked worktrees and submodules by updating rolling to prek 0.3.9, which honors repo-local and worktree-local core.hooksPath.
  • Fixed devenv processes stop removing the process from the manager state, making it impossible to start or restart afterwards.
  • Fixed process exec probes failing with "No such file or directory" during devenv test when a task depends on a process (e.g. after = [ "devenv:processes:postgres" ]), because the bash path was not resolved for the enterTest task runner (#2713).
  • Fixed processes with restart = "never" not satisfying @completed task dependencies, causing a hot loop and dependencies to never resolve (#2712).
  • Fixed TUI hiding Nix evaluation error details, showing only a failure mark without the actual error message (#2720). Failed Evaluating activities now auto-fetch and display their propagated error logs.

Improvements

  • The TUI now shuts down ~50ms faster.
  • TUI operation activities (Configuring shell, Configuring cachix, Loading tasks, etc.) now nest under their parent activity instead of being forced to the top level. "Configuring cachix" appears as a child of "Configuring shell" (next to "Evaluating shell"), reflecting that cachix setup runs as part of shell configuration.
  • "Validating lock" is now visible in the TUI by default instead of hidden behind the Debug filter.
  • Sped up devenv shell startup on projects with many cached input paths by batching file watcher registration into a single pathset update and readiness wait, instead of reconciling the pathset once per path. This removes long hangs before enterShell on large inputs.
  • Fixed port allocation values (config.processes.<name>.ports.<port>.value) resolving to the base allocate port in devenv shell, devenv tasks run, and other commands. When the native process manager is running, port values now match the ports allocated by devenv up (#2710).
  • Standardized keyboard shortcut notation across devenv up TUI and devenv shell to use consistent Ctrl-E format instead of mixed ^e/Ctrl-Alt-E styles. macOS now shows Opt instead of Alt (#2736).
  • Auto-detect AI coding agents (via CLAUDECODE, OPENCODE_CLIENT, and AI_AGENT environment variables) and enable quiet mode to avoid wasting LLM tokens on TUI progress output. Override with --verbose, --tui, or set DEVENV_NO_AI_AGENT=1 to disable detection entirely (#2723).
  • Always enable Nix's show-trace setting so full evaluation stack traces are shown on error, instead of a truncated trace suggesting the nonexistent --show-trace flag (#2725).
  • Upgraded Nix to 2.34, bringing multithreaded tarball unpacking, evaluator performance improvements, and REPL enhancements.
  • Added require_version field to devenv.yaml to enforce a devenv CLI version. Set to true to match the modules version, or use a constraint string like ">=2.1" (#2391).
  • Added Ctrl-X keybinding to stop individual processes from the TUI while keeping them visible and restartable.
  • Added Ctrl-H keybinding to toggle hiding stopped processes in the TUI. Failed processes remain visible, and the process count shows how many are hidden (#2692).
  • Tasks can now display messages when entering the shell by writing {"devenv":{"messages":["..."]}} to $DEVENV_TASK_OUTPUT_FILE (#2500).
  • Added devenv hook <shell> for native directory based auto-activation without direnv. Supports bash, zsh, fish, and nushell. Automatically deactivates when you leave the project directory. Add eval "$(devenv hook bash)" to your shell config to activate. Use devenv allow and devenv revoke to manage trust (#2488).
  • Shell environment now auto-reloads at the next prompt when watched files change, instead of requiring a manual Ctrl-Alt-R keybind (#2595).
  • Added nixpkgs.rocmSupport option to enable ROCm support in nixpkgs configuration.
  • Added process management subcommands and MCP tools: devenv processes list, status, logs, restart, start, stop for interacting with running native processes (#2621).
  • Added --mode flag to devenv up / devenv processes up to control dependency resolution for process tasks. Supports single, before, after, and all modes, matching devenv tasks run --mode. Defaults to all, so devenv up starts all processes by default (#2721).
  • Added OpenTelemetry OTLP trace export support via --trace-to (otlp-grpc, otlp-http-protobuf, otlp-http-json) with configurable endpoints or standard OTEL_* environment variables. OTLP spans include rich attributes (devenv.activity.kind, devenv.derivation_path, devenv.url, devenv.fetch.kind) and outcome tracking (devenv.outcome, otel.status_code). Enabled by default with the otlp-grpc cargo feature; otlp-http-protobuf and otlp-http-json are opt-in (#2415).
  • Added OTEL trace context propagation to subprocesses: tasks, shell commands, and processes automatically receive TRACEPARENT/TRACESTATE environment variables when OTLP export is enabled, allowing instrumented child processes to join the same trace (#2415).
  • Added --trace-to unified tracing flag with [format:]destination syntax, supporting multiple simultaneous outputs (e.g. --trace-to pretty:stderr --trace-to json:file:/tmp/trace.json). Also available as DEVENV_TRACE_TO env var (comma-separated). Legacy --trace-output/--trace-format flags are still supported but hidden.

Breaking Changes

  • devenv tasks run: The default execution mode is now before instead of single, so task dependencies declared via before/after are respected by default. Running devenv tasks run admin:deploy now also runs any tasks that admin:deploy depends on. Use --mode single to restore the previous behavior of running only the specified task (#2551).
  • Calling devenv without a command now shows the help text. This used to print the version. Use devenv version or devenv --version instead.

Don't miss a new devenv release

NewReleases is sending notifications on new releases.