Repository navigation
Reuse unchanged modules in DirRepository's cache - #701
Merged
Merged
Conversation
The cache was indexed by qualified module name but looked up by file name, so after the scan interval every access reloaded every module in the directory, failed files were retried and reported on each rescan, and an emptied directory kept its deleted modules. Cache each file's metadata and load result, failed or not, by file name next to the module-name index, reload only files whose timestamp or size changed, and treat a removed file as a change.
Naming it module made the source rely on Tree-sitter accepting that contextual keyword as a variable name, which the grammar does not do yet, so the XDK parse check failed. Keep master's name for the module template and name the file template fileTemplate.
lagergren
added a commit
that referenced
this pull request
Oct 15, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 15, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
ggleyzer
approved these changes
Oct 15, 2026
lagergren
added a commit
that referenced
this pull request
Oct 15, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 19, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 20, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 21, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
The LSP reads bundled libraries and explicit dependencies into build repositories and never opens a filesystem repository, so it needs none of the repository cache, fallback or reporting changes. Restore DirRepository, FileRepository, LinkedRepository, ModuleInfoRepository and Ecstasy's DirRepository to master, remove the repository error listener constructors and their tests, and keep ModuleRepository.of as a plain factory for callers that choose a repository by path type. The Ecstasy cache fix continues separately in #701.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
lagergren
added a commit
that referenced
this pull request
Oct 28, 2026
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
lagergren
added a commit
that referenced
this pull request
Nov 4, 2026
lagergren
added a commit
that referenced
this pull request
Nov 5, 2026
lagergren
added a commit
that referenced
this pull request
Nov 9, 2026
lagergren
added a commit
that referenced
this pull request
Nov 11, 2026
lagergren
added a commit
that referenced
this pull request
Nov 22, 2026
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
lagergren
added a commit
that referenced
this pull request
Nov 25, 2026
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
lagergren
added a commit
that referenced
this pull request
Nov 26, 2026
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
lagergren
added a commit
that referenced
this pull request
Nov 28, 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.
Summary
ecstasy.mgmt.DirRepositorystores its cache entries by qualified module name, butisCacheValid()andensureCache()look them up by file name. The lookups never match, so:isCacheValid()has no files to check and reports the cache as valid, so deleted modules stay listed.(If a lookup had matched, the unchanged entry would have been skipped with
continueand dropped from the new cache.)This keeps each file's metadata and load result, including a failed load, in a cache keyed by file name, next to the module-name index. Unchanged files are reused on later scans whether or not they loaded, only files whose timestamp or size changed are reloaded, and a removed file invalidates the cache. Error messages are unchanged.
Testing
./gradlew :xdk:installDist :xdk:test spotlessCheckA small module creates a
DirRepositoryover a directory holding one valid module and one unreadable.xtcfile, looks the valid module up three times with a missing-module lookup after each one (forcing a rescan), then deletes both files:moduleNamesafter deleting both files{Good.example.org}{}