Repository navigation
Leave folders that git ignores out of the workspace - #1485
Merged
Merged
Conversation
Build output that git ignores (`deps/build/`, `docs/build/`, coverage trees) is no longer part of the workspace. The initial walk, folder-create scans and workspace-folder adds all go through one `GitIgnoreFilter` built from the workspace folders, and Created/Changed watcher events for files in an ignored folder are dropped before anything is read. This is what stops a CPack re-stage of `deps/build/_CPack_Packages/.../full`, a copy of the package, from becoming a second package and starting an indexing child on every `cpack` run. A `.gitignore` edit takes effect right away: `**/.gitignore` is watched, and an event for one re-scans the workspace folders, dropping the tracked files the new rules hide and adding the ones they now admit. Files open in the editor stay either way. Needs JuliaWorkspaces 13.5 for `GitIgnoreFilter`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened by Claude (Claude Code) from a crash-telemetry review (c54).
Depends on JuliaWorkspaces.jl#353. This PR raises the compat bound to
JuliaWorkspaces = "13.5"with no runtime feature check, so CI stays red until JuliaWorkspaces 13.5 is registered.Why
A 1.243.1 crash report's stderr showed a background indexing child starting again and again for
deps/build/_CPack_Packages/win64/ZIP/iGMT-0.1.0-win64/full. That folder is CPack's staging copy of the user's package, including itsProject.toml, so it was indexed as a second package. Everycpackrun re-creates it. The**create/delete watcher then removed and re-added itsProject.toml, and each re-add served the scratch environment again and started another refresh child. The folder is gitignored (deps/build/). JuliaWorkspaces.jl#353 has the full analysis and the reproduction.Change
gitignore_filter(server)is aJuliaWorkspaces.GitIgnoreFilterfor the current workspace folders. It is built on first use and reset when a workspace folder is added or removed, or when a.gitignorechanges.collect_folder_files!passes it to the walk, so the initial load, folder-create scans (add_folder_children!) and workspace-folder adds all skip ignored folders.deps/buildtherefore costs no reads and adds nothing..gitignoreedits take effect live.**/.gitignorejoins the registered watchers. An event for one runsrescan_workspace_folders!: it re-walks each workspace folder under the new rules (paths only), drops tracked files that are no longer admitted, and reads and adds only the newly admitted ones, in oneadd_files!batch. Open files stay in the workspace either way.Manifest.tomlstill counts.Tests
Two new items in
test/test_watched_folders.jl:deps/build/ignored, a folder create plus file Created/Changed events for a CPack-style copy add nothing, while a newsrc/b.jlis added.gen/to.gitignoreand sending its event removes the trackedgenfiles and keeps the open one. Removing the rule brings them back, and the open file gets its from-disc record back.Full suite run locally on Windows with Julia 1.12, against JuliaWorkspaces.jl#353: 213152 passed and 1 broken (pre-existing), no failures.
🤖 Generated with Claude Code