-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
tsserver is not filtering on filesToSearch while performing the documentHighlights request when esModuleInterop is enabled.
See the following log excerpt from typescript@next:
Info 43 [13:15:29.10] request:
{"command":"documentHighlights","seq":"85","arguments":{"file":"/home/bdowning/projects/mrm/ms-test/test.ts","line":5,"offset":32,"filesToSearch":["/home/bdowning/projects/mrm/ms-test/test.ts"]}}
Info 44 [13:15:29.13] Starting updateGraphWorker: Project: /home/bdowning/projects/mrm/ms-test/tsconfig.json
Info 45 [13:15:29.13] Finishing updateGraphWorker: Project: /home/bdowning/projects/mrm/ms-test/tsconfig.json structureChanged: false Elapsed: 0ms
Perf 46 [13:15:29.70] 85::documentHighlights: elapsed time (in milliseconds) 60.3616
Info 47 [13:15:29.70] response:
{"seq":0,"type":"response","command":"documentHighlights","request_seq":"85","success":true,"body":[{"file":"/home/bdowning/projects/mrm/ms-test/node_modules/@types/node/index.d.ts","highlightSpans":[{"start":{"line":5585,"offset":21},"end":{"line":5585,"offset":30},"kind":"writtenReference"},{"start":{"line":5586,"offset":21},"end":{"line":5586,"offset":30},"kind":"writtenReference"},{"start":{"line":5587,"offset":21},"end":{"line":5587,"offset":30},"kind":"writtenReference"},{"start":{"line":5588,"offset":21},"end":{"line":5588,"offset":30},"kind":"writtenReference"},{"start":{"line":5589,"offset":21},"end":{"line":5589,"offset":30},"kind":"writtenReference"},{"start":{"line":5590,"offset":21},"end":{"line":5590,"offset":30},"kind":"writtenReference"},{"start":{"line":5591,"offset":21},"end":{"line":5591,"offset":30},"kind":"writtenReference"},{"start":{"line":5592,"offset":21},"end":{"line":5592,"offset":30},"kind":"writtenReference"},{"start":{"line":5593,"offset":21},"end":{"line":5593,"offset":30},"kind":"writtenReference"},{"start":{"line":5594,"offset":21},"end":{"line":5594,"offset":30},"kind":"writtenReference"},{"start":{"line":5595,"offset":21},"end":{"line":5595,"offset":30},"kind":"writtenReference"},{"start":{"line":5596,"offset":21},"end":{"line":5596,"offset":30},"kind":"writtenReference"},{"start":{"line":5597,"offset":21},"end":{"line":5597,"offset":30},"kind":"writtenReference"},{"start":{"line":5598,"offset":21},"end":{"line":5598,"offset":30},"kind":"writtenReference"},{"start":{"line":5599,"offset":22},"end":{"line":5599,"offset":31},"kind":"writtenReference"}]}]}
I'll also try to attach the unabridged log files.
TypeScript Version: 2.8.0-dev.20180203
Search Terms:
tsserver filesToSearch documentHighlights
Code
N/A; this is a tsserver behavior problem.
Expected behavior:
documentHighlights response is limited to requested files
Actual behavior:
documentHighlights response appears to contain matches from entire project, regardless of filesToSearch.
Playground Link:
N/A; this is a tsserver behavior problem.
Related Issues:
Possibly the root cause of #21506? This is breaking emacs's tide-mode with tide-hl-identifier-modon. Never mind, I see now that's reproducible back to 2.5.