Skip to content

reload: exclude devenv state dir from hot-reload watch set#2806

Open
ndam-hexagon wants to merge 1 commit into
cachix:mainfrom
ndam-hexagon:dev/ndam-hexagon/monorepo-fix-devenv-watching-files
Open

reload: exclude devenv state dir from hot-reload watch set#2806
ndam-hexagon wants to merge 1 commit into
cachix:mainfrom
ndam-hexagon:dev/ndam-hexagon/monorepo-fix-devenv-watching-files

Conversation

@ndam-hexagon
Copy link
Copy Markdown
Contributor

The reload watch set was built from the eval cache's file_input table, which records every path Nix reads during evaluation. Reads under .devenv/ ended up including the eval cache's own SQLite WAL/SHM sidecars; each reload rewrote the WAL, the watcher fired, and shell reload looped forever.

Filter watch candidates by self.dotfile in DevenvShellBuilder, and also add the dotfile dir to CachingConfig.excluded_paths so devenv state never enters the eval cache as a tracked input.

The reload watch set was built from the eval cache's file_input table,
which records every path Nix reads during evaluation. Reads under
.devenv/ ended up including the eval cache's own SQLite WAL/SHM
sidecars; each reload rewrote the WAL, the watcher fired, and shell
reload looped forever.

Filter watch candidates by self.dotfile in DevenvShellBuilder, and
also add the dotfile dir to CachingConfig.excluded_paths so devenv
state never enters the eval cache as a tracked input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@domenkozar
Copy link
Copy Markdown
Member

Maybe we should skip individual devenv files? I'm worried that someone might store something into DEVENV_STATE and expect the reload to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants