Skip to content

VS Code plugin stopped finding references - Regression - Svelte 3 #2756

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

Open
benbucksch opened this issue May 3, 2025 · 2 comments
Open
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@benbucksch
Copy link

benbucksch commented May 3, 2025

Describe the bug

Since a few weeks, my VS Code doesn't find code references anymore.

Reproduction

  • Open a project that uses Svelte 3
  • Go to any TypeScript class defined in a .ts file
  • Right click on a class property, function, enum value or similar
  • Select menu item "Find all references" (Alt-Ctrl-F12)

Actual result

  • VS Code finds references, so it appears to work, but they are only from the TypeScript files
  • None of the references in .svelte files are found
  • This means that I am regularly breaking my code during refactoring, because I am not seeing all instances of the identifier.

Expected behaviour

  • VS Code finds all references, without exception, including in Svelte files

Regression

  • I am positive that this worked correctly, not too long ago (a few weeks, maybe 1-2 months).
  • I don't know when exactly it regressed and when I updated the VS Code plugin

Non-solution

  • Upgrade to Svelte 5 is not an option.

System Info

  • OS: Ubuntu 24.04
  • IDE: VSCodium
  • The project is currently using Svelte 3.55.1.
  • Parula is a major application of the size of Microsoft Outlook, Teams, of Thunderbird, with a corresponding code size and complexity, and depends entirely on Svelte for the UI, so even a mild upgrade to Svelte 4 is very risky.

Which package is the issue about?

Svelte for VS Code extension

@benbucksch benbucksch added the bug Something isn't working label May 3, 2025
@itzTheMeow
Copy link

I noticed this occurs on my Svelte 3 project. The entire Svelte Language Server seems to fail. I can't autocomplete or format files either.
Downgrading the extension from 109.6.0 to 109.5.4 fixes the issue.

@jasonlyu123
Copy link
Member

jasonlyu123 commented May 5, 2025

We recently changed the logic to exclude "solution" project, the tsconfig with project references and files: []. This problem is that this logic depends on TypeScript's internal behaviour, and it doesn't work in TypeScript <5.7. The workaround for now is not using the workspace version of TypeScript.

The change was introduced in 109.4.0. @itzTheMeow, your problem shouldn't be the same issue. Please open a new issue with a reproduction.

dummdidumm pushed a commit that referenced this issue May 14, 2025
)

#2756

The problem is that in TypeScript before 5.7, the project files were added later than plugin initialisation. Thus, the IsSolution method will always return true in any project using project references during plugin initialisation.
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

4 participants