-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editor
Milestone
Description
🔎 Search Terms
autocomplete, duplicate suggestions, duplicate imports, root dirs
🕗 Version & Regression Information
- This is the behavior in every version I tried, but was made worse after Fix an off-by-one error in getBaseDirectoriesFromRootDirs #55233 (v5.3-beta and later)
💻 Code
When rootDirs are src/ and build/dts, and the directory structure is following:
app/
src/
index.ts
dir/
a.module.scss
build/
dts/
index.d.ts
dir/
a.module.scss.d.ts
🙁 Actual behavior
Import completions when invoked from index.ts (using import {} from "./) have a duplicate entry for dir
🙂 Expected behavior
Only a single entry for dir is present.
Additional information about the issue
The bug occurs because when we're combining completions from the point of view of each root dir, we're not deduplicating the entries.
This issue has existed for a long time, but it was made more obvious after #55233 fixed a related bug.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editor