Fix unbounded recipe-local file discovery - #538
Conversation
2f9be4b to
ccf0d4d
Compare
deribaucourt
left a comment
There was a problem hiding this comment.
Thanks for rapidly taking a hold of this issue with lots of distributed changes!
I do have a few major remarks on code performance and maintainability. Please take a look.
ccf0d4d to
23014cb
Compare
|
@deribaucourt I have addressed the review feedback and updated the PR history:
The targeted client and server suites pass (31 tests in total), along with ESLint and the full TypeScript compilation. Could you please take another look when convenient? |
deribaucourt
left a comment
There was a problem hiding this comment.
Very minor remarks with the new implementation. It provides great results, thanks a lot!
|
@deribaucourt Thank you for the follow-up review, for testing the responsiveness of the new search, and for merging the contribution. All five minor remarks were addressed in
CI run #1633 passed completely, including lint, compilation, the full test project, the standalone language-server package, and the VSIX build. I also performed a final focused review of the resulting implementation. I did not identify any further change that should have been folded into this PR. A possible additional test for a non-cancellation stream error remains a future, non-blocking improvement so the merged change stays focused. |
Summary
Fix unbounded recipe-local discovery that could recursively scan a configured build directory when editing documents such as
build.conf.Fixes #537.
Root cause
Recipe-local discovery was triggered eagerly from document changes and used separate traversal paths for files and directories.
The client also attempted recipe-local discovery for
.confdocuments even though recipe-local links are not applicable there.Changes
.confdocuments before requesting links or starting a scan;fast-glob.stream()scan;CancellationTokenandstream.destroy();SRC_URI;Commit structure
test: cover recipe-local document linksfix: bound recipe-local file discoveryoptim: defer recipe-local discovery to completionValidation
npm run compile;