Skip to content

Exclude directories containing CACHEDIR.TAG - #845

Merged
SimonCropp merged 2 commits into
mainfrom
exclude-target
Sep 24, 2026
Merged

SimonCropp merged 2 commits into
mainfrom
exclude-target

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Skips any directory that contains a CACHEDIR.TAG file (Cache Directory Tagging spec), in DefaultDirectoryExclusions.

Cargo writes one into its target directory (whatever it is named, including a custom CARGO_TARGET_DIR). Scanning that directory is wasted work and can fail outright: it holds files cargo keeps byte-range locked (e.g. .cargo-artifact-lock), and when two projects in one solution reference MarkdownSnippets their concurrent scans fail with "another process has locked a portion of the file". krillaNet currently works around this with "ExcludeDirectories": [ "target" ].

Keyed on the marker rather than the name target, which is too generic to exclude outright. Other tools that follow the spec get skipped too.

@SimonCropp SimonCropp changed the title Exclude cargo target directory by default Exclude directories containing CACHEDIR.TAG Sep 24, 2026
@SimonCropp SimonCropp added this to the 28.4.4 milestone Sep 24, 2026
@SimonCropp
SimonCropp merged commit b1bad86 into main Sep 24, 2026
5 checks passed
@SimonCropp
SimonCropp deleted the exclude-target branch September 24, 2026 01:50
This was referenced Sep 24, 2026
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.

1 participant