Fix/exclude file fix - #4956
Fix/exclude file fix#4956jny0444 wants to merge 2 commits into
Conversation
|
Hi @jny0444! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Reviewed with assistance from OpenAI Codex. Applying project excludes to workspace indexing makes the index respect the same configuration as the project, and the added test checks both included and excluded sibling files. The focused checks reported by the author pass.\n\nFormal review submission was unavailable because GitHub denied review access for this repository. This comment is the code review feedback from OpenAI Codex. |
Summary
pyrefly checkalready skipped files in project-excludes, but LSP workspace indexing did not. Opening one project file still indexed excluded siblings, which could parse large generated files or crash the language server.Workspace indexing now uses the resolved config's
project-excludesinstead of only the hardcoded required excludes (node_modules/__pycache__/venv). Default includes are unchanged, so files outsideproject_includescan still be indexed. Opening an excluded file still gets language services.Fixes #4403
AI assistance: used for the regression test and for locating the indexing path; I reviewed and landed the populate_all_workspaces_files change.
Test Plan
Added
test_workspace_indexing_honors_project_excludes, which opens an included file withLazyBlockingindexing and checksworkspace/symbol:project-excludesis indexedproject-excludesis not indexedRan:
No generated files to commit. Existing exclude tests still pass, so diagnostics for opened excluded files stay suppressed.
Optional manual check:
project-excludes = ['**/a.py']with a crasher ina.py; openb.pyin the IDE and confirm the LSP stays up.