Skip to content
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

Symbols defined outside of the .svelte file being edited cannot be found in VSCode post extension v108.2.0 #2260

Closed
ktnyt opened this issue Jan 14, 2024 · 1 comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@ktnyt
Copy link

ktnyt commented Jan 14, 2024

Describe the bug

Symbols which are defined outside of the .svelte file that I'm currently working in cannot be found from within the .svelte file using the VSCode autocomplete feature.

Reproduction

export const THE_ANSWER = 42;
<div>{THE_ANSWER}</div>

In 108.1.0

Kapture 2024-01-14 at 09 33 27

In 108.2.0

Kapture 2024-01-14 at 09 32 22

Expected behaviour

Autocompletion is consistent with prior extension versions.

System Info

  • OS: macOS Monterey Version 12.7.0
  • IDE: VSCode
    • Version: 1.85.1 (Universal)
    • Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
    • Date: 2023-12-13T09:48:06.308Z (1 mo ago)
    • Electron: 25.9.7
    • ElectronBuildId: 25551756
    • Chromium: 114.0.5735.289
    • Node.js: 18.15.0
    • V8: 11.4.183.29-electron.0
    • OS: Darwin arm64 21.6.0

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

Hello contributors. First of all I'd like to thank everyone for your effort in delivering an awesome ecosystem of development tools. I've only started working with Svelte in the last few months and it has absolutely been a wonderful experience.

As I was working on a project today I noticed that some symbols were not being found by the VSCode autocomplete feature. After searching for potential solutions and double checking if I had accidentally altered some essential settings, I came to a dead end and as a last resort suspected if any recent changes to the toolchain had anything to do with this issue. Realizing that the most recent Svelte extension version (as of writing) which is 108.2.0 was updated this morning (in JST) which is exactly when I started to experience issues.

I confirmed that installing 108.1.0 fixed the issue so I will use 108.1.0 for now.

@ktnyt ktnyt added the bug Something isn't working label Jan 14, 2024
@akb5566
Copy link

akb5566 commented Jan 15, 2024

If you are using Sveltekit, 108.2.0 also cannot auto-import your custom components.

e.g.

  • You have a component named UserList in $lib/components/UserList.svelte
  • You type <Use /> in another svelte file, it won't auto-complete/auto-import UserList component for you like it used to.

Downgrade to 108.1.0 fix this problem.

dummdidumm pushed a commit that referenced this issue Jan 15, 2024
The export info cache is created with an edit that doesn't trigger auto imports. And then The onFileChanged call marks the cache to be usable even though nothing is cached yet.

#2260
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Jan 15, 2024
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

3 participants