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

End of file breaking autocompletion #4583

Closed
unpseudocomplique opened this issue Jul 12, 2024 · 17 comments · Fixed by #4771
Closed

End of file breaking autocompletion #4583

unpseudocomplique opened this issue Jul 12, 2024 · 17 comments · Fixed by #4771
Labels
bug Something isn't working need info

Comments

@unpseudocomplique
Copy link

Vue - Official extension or vue-tsc version

2.0.26

VSCode version

1.91.0

Vue version

3.4.0

TypeScript version

idk how to get it

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 19.45 GB / 47.94 GB
  Binaries:
    Node: 20.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.6.6 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.4.0 - C:\Program Files\nodejs\pnpm.CMD
    bun: 1.1.17 - ~\.bun\bin\bun.EXE
  Browsers:
    Chrome: 126.0.6478.127
    Edge: Chromium (126.0.2592.87), ChromiumDev (127.0.2610.3)
    Internet Explorer: 11.0.22621.3527

Steps to reproduce

having an unexpected end of file break the autocompletion forever.
Like having a component without end tag, the only solution is to do a reload window.

It's also annoying because sometimes i want volar to import my component but because of the end of file it break before importing.

image

What is expected?

Autocompletion should still work even if an issue is present on the component

What is actually happening?

Autocompletion is break and won't come back even when component is fixed !

Link to minimal reproduction

https://play.vuejs.org/#eNp9kE1Lw0AQhv/KuJcolIjoqaSCSkE9qKjgZS8hmaRb94v9qIGQ/+7shtYepLfd93ln5p0Z2Z215S4iW7LKN07YAB5DtCBr3a84C56zW66FssYFGMFhBxN0zigoqKzgmuvGaB9A+R5WiZ8XjyilgS/jZHtWXHBdXc6tqRF9Aior64D0A6g2V4kfaWxBQ6llJ/py642mZGNyctYYZYVE92qDoJGcLSGTxGqa+POcteAiLvZ6s8Hm+x9964ekcfbm0KPbIWcHFmrXY5jx+uMFB3ofoDJtlOQ+Ad/RGxlTxtl2H3VLsY98Oe1TvqnQ/adfDwG13y+VgibnlP2c0Z0fTqz+F/e6vMl1XE9s+gWabZzJ

Any additional comments?

No response

@unpseudocomplique unpseudocomplique changed the title breaking Autocompletion End of file breaking autocompletion Jul 12, 2024
@johnsoncodehk
Copy link
Member

Thanks for the report, but I can't reproduce the problem in the code you provided, auto-complete worked for me when the SFC structure was fixed.

Can you provide a video that fully demonstrates how the problem occurs?

@unpseudocomplique
Copy link
Author

Sorry i tryed a lot and can't reproduce it again 😥

Will try to stay alert when this happen to create another repro!

Anyway is it possible to make the autocompletion keep working even when something is wrong ? This happen a lot allong the day that something is in dev and it's normal that for now it's broken.
That might also implicitly fix my issue.

@johnsoncodehk
Copy link
Member

Anyway is it possible to make the autocompletion keep working even when something is wrong ?

The "Vue: Restart Vue and TS servers" command could help.

image

@johnsoncodehk johnsoncodehk added bug Something isn't working need info and removed pending triage labels Jul 14, 2024
@unpseudocomplique
Copy link
Author

Yea, i'm doing reload window every time and this fix it ! But i belive this would be a much better dx to just work even with issue with the file?

@RayGuo-ergou
Copy link
Contributor

I had the same issue time to time, but could not reproduce easily ( so I did not create an issue ). My general guessing is there's a race condition ( I could be very wrong ) like:

Request A send
Request B send

Response B
Response A

@davidmatter
Copy link
Collaborator

Can't reproduce in 2.0.28. Is this still an issue for you?

@RayGuo-ergou
Copy link
Contributor

From memory yes, but it happens so rare that my memory about this issue is quite blur. E.g. I am not event sure was it before 2.0.28 or after. Either way I am not too concern of this error to be honestly. I guess you can close this for now, I will remember to post here if I reproduced again.

@exzolink
Copy link

exzolink commented Aug 27, 2024

@davidmatter
Same issue, EOF error or something else (sometimes they dont work in top of template) breaks completions
2.0.29 (Windows)
https://imgur.com/a/pzoXA40

@exzolink
Copy link

@zhiyuanzmj Could you take a look at this?

@zhiyuanzmj zhiyuanzmj reopened this Aug 31, 2024
@zhiyuanzmj
Copy link
Collaborator

when the SFC structure was fixed.

auto-complete don't work when the SFC structure was fixed?

@exzolink
Copy link

when the SFC structure was fixed.

auto-complete don't work when the SFC structure was fixed?

Do you mean this? https://imgur.com/a/bp9hTHA
With closed tag it works, yes, even if there is no end tag

@zhiyuanzmj
Copy link
Collaborator

This url is 403, I can't see it.

@exzolink
Copy link

This url is 403, I can't see it.

Try this https://i.imgur.com/4t7rFue.png

@zhiyuanzmj
Copy link
Collaborator

No also can't see it, why not copy to the comment input box.

@exzolink
Copy link

Weird, maybe cdn issue

4t7rFue

@exzolink
Copy link

Images in my first comment
dzHrgGf
9dSf5A6

@exzolink
Copy link

exzolink commented Sep 1, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need info
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants