kitamstudios / rust-analyzer.vs

Rust language support for Visual Studio 2022
https://marketplace.visualstudio.com/items?itemName=kitamstudios.RustAnalyzer
Other
138 stars 10 forks source link

Failing Prerequisite check causes loop of failure #26

Closed johnkiddjr closed 7 months ago

johnkiddjr commented 1 year ago

Opening with the incorrect version of Visual Studio causes a failure loop. For reference I had 17.5.2 installed, and 17.6 is the apparent minimum version.

Opening a Rust project folder causes the message to appear reading "Prerequisite check(s) failed: - VS Version check failed. Minimum 17.6, found 17.5.33502.453. Pressing OK will open prerequisites install instructions and restart the IDE."

This then does as it claims, but on reopening (which is immediate) it opens the same folder and prompts again with the same message.

A better behavior would be to just open the prerequisites page and not send the IDE into a loop with a modal error message. Even better, would be to force open Visual Studio Installer so the updates can be installed.

parthopdas commented 1 year ago

I thought about this and decided to to adopt the best extreme route.

Other alternative was to make this a soft check but this caused people to forget to install the pre-reqs and have a subpar confusing experience.

you could of course install the update while the loop is on.

What do you recommend?

johnkiddjr commented 1 year ago

Best case would be a failure message that triggers the prerequisite page but closes the IDE and does not restart it.

The soft check is not preferred because of your stated reason: it can cause things to not work and provide a subpar experience.

parthopdas commented 1 year ago

yeah makes sense. didn't add that so far as VS didn't have an api for it.

Are you able to take a look and raise a PR?

If not i'll get to it shortly.

Pafnoutios commented 7 months ago

I don't want an extension trying to dictate when I upgrade Visual Studio. I don't want an extension force-closing Visual Studio on me. I would rather the extension not update if it won't be compatible with my current version.

parthopdas commented 7 months ago

Makes sense. I have relaxed it so none of the existing users will hit it.

I put it there originally as there were breaking changes between point releases that caused undefined behavior with the extension. Meaning it would lead to an unstable experience for rust devs.

parthopdas commented 7 months ago

Please reactivate if this does not address the issue.