You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reload: exclude devenv dotfile from eval inputs and watch set
`lib.fileset.fromSource ./.` (and any other `readDir` on a parent of
`.devenv/`) was dragging devenv's own churn into the Nix tracked-input
set: the eval-cache SQLite db + WAL/SHM are rewritten on every
evaluation, the tasks db on every task run, and shell-env.sh /
imports.txt / generated bootstrap files on every build. Tracked
inputs that change every run mean cache validity is poisoned and the
reload watcher self-triggers in an infinite loop after the first
reload.
Exclude the whole devenv dotfile from both the eval cache's tracked
inputs (CachingConfig.excluded_paths) and the reload watcher
(is_watchable_input in reload::owner). To preserve the documented
$DEVENV_STATE contract, carve out `<dotfile>/state/` via
CachingConfig.excluded_path_exceptions and the equivalent predicate
in the watcher: files users persist there still trigger reload and
cache invalidation.
The carve-out would otherwise re-admit devenv-managed leaves under
`state/` — the tasks-cache sqlite db (rewritten on every task run)
and the git-hooks state dir (rewritten on every reload) — and
reintroduce the same loop scoped to state/. Switch `ops_to_inputs`
to longest-prefix-match between `excluded_paths` and
`excluded_path_exceptions`: the most specific rule wins, ties favor
the exception. Callers can then list `<dotfile>/state/tasks.db`,
`tasks.db-wal`, `tasks.db-shm`, and `git-hooks` back in
`excluded_paths` and have them override the broader state exception.
`is_watchable_input` mirrors the same leaf list as defense in depth
in case a stale eval-cache row predates the filter.
`Path::starts_with` matches on components, so each sqlite sibling
(`-wal`, `-shm`) is its own component and is listed explicitly — a
`tasks.db` prefix would not cover them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
- Fixed long lines in `devenv shell` getting a hard newline inserted at the wrap point when copying to clipboard. The shell now preserves the soft-wrap when flushing wrapped output into the terminal's scrollback, so clipboard copy keeps the original single line ([#2865](https://github.com/cachix/devenv/issues/2865)).
18
18
- Fixed files declared with the `files` option not being regenerated when an auto-loaded (`devenv allow`) shell reloaded after `devenv update`. enterShell tasks (including `devenv:files`) now re-run on hot-reload, matching a fresh shell entry, instead of only updating environment variables ([#2864](https://github.com/cachix/devenv/issues/2864)).
19
19
- Fixed `devenv test --no-tui` (and any other non-TUI invocation) silently discarding all output from the `enterTest` script, so the test runner's output, traces, and failure messages never reached the terminal or CI logs. Output from commands run in the shell is now printed in non-TUI mode.
20
+
- Fixed `devenv shell` self-triggering hot-reload in an infinite loop after the first reload, and `lib.fileset.fromSource ./.` (and similar `readDir` calls on a parent of `.devenv/`) dragging devenv's own churn (eval cache WAL/SHM, tasks DB, generated shell scripts, `imports.txt`, …) into the Nix tracked-input set and causing spurious rebuilds. The devenv dotfile dir is now excluded from both the reload watch set and the eval cache's tracked inputs, with a carve-out for `.devenv/state/` (`$DEVENV_STATE`) so files users persist there still trigger reload.
0 commit comments