Skip to content

Duplicate import path completions when multiple root directories are present #57368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PhoebeSzmucer opened this issue Feb 10, 2024 · 0 comments · Fixed by #57369
Closed

Duplicate import path completions when multiple root directories are present #57368

PhoebeSzmucer opened this issue Feb 10, 2024 · 0 comments · Fixed by #57369
Assignees
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor
Milestone

Comments

@PhoebeSzmucer
Copy link
Contributor

PhoebeSzmucer commented Feb 10, 2024

🔎 Search Terms

autocomplete, duplicate suggestions, duplicate imports, root dirs

🕗 Version & Regression Information

💻 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

Screenshot 2024-02-10 at 21 42 14

🙂 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.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Feb 12, 2024
@andrewbranch andrewbranch added the Bug A bug in TypeScript label Feb 12, 2024
@andrewbranch andrewbranch added this to the Backlog milestone Feb 12, 2024
@andrewbranch andrewbranch added Domain: Completion Lists The issue relates to showing completion lists in an editor and removed Needs Investigation This issue needs a team member to investigate its status. labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants