Skip to content

Apply a project's own ignore rules when listing its files - #2162

Merged
bbatsov merged 1 commit into
masterfrom
fix/2162-per-project-ignores
Aug 18, 2026
Merged

Apply a project's own ignore rules when listing its files#2162
bbatsov merged 1 commit into
masterfrom
fix/2162-per-project-ignores

Conversation

@bbatsov

@bbatsov bbatsov commented Aug 18, 2026

Copy link
Copy Markdown
Owner

projectile-project-files takes a project root, but everything it filtered by resolved against projectile-project-root instead - so listing another project's files applied the dirconfig of whichever project you happened to be visiting.

Invisible while every caller asked about the project it was already in. The commands that walk several projects are where it shows, and it bites twice: the listing is wrong, and with caching on that wrong list gets stored under the other project's key, so an ordinary projectile-find-file there keeps offering ignored files. With persistent caching it lands in that project's cache file and survives a restart.

The root now travels as an argument all the way down to projectile-parse-dirconfig-file. Nine specs cover it; I checked they all fail without the change.

`projectile-project-files' takes a project root, but the ignore rules it
filtered by came from the project you were visiting: the chain from
`projectile-remove-ignored' and `projectile-dir-files-native' down to
`projectile-parse-dirconfig-file' resolved everything against
`projectile-project-root' with no way to say which project was meant.

That was invisible while every caller asked about the project it was
already in.  The commands that walk several projects - find-file in the
known projects, and now the sibling commands - are the ones it bites,
and it bites twice: the listing is wrong, and with caching on the wrong
list is stored under the other project's key, so an ordinary find-file
there offers ignored files afterwards.  Persistent caching writes it to
that project's cache file, where it survives a restart.

The root now travels as an argument the whole way down.
@bbatsov
bbatsov merged commit a13ad93 into master Aug 18, 2026
10 checks passed
@bbatsov
bbatsov deleted the fix/2162-per-project-ignores branch August 18, 2026 12:52
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