-
Notifications
You must be signed in to change notification settings - Fork 266
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
Don't fail if the user is offline #1898
Conversation
…veVersions on acquirectx
version resolver is a class that is based around using the internet. It probably should have been like this before.
vscode-dotnet-runtime-library/src/Acquisition/VersionUtilities.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split the function to handle command in different files. It is making harder to review changes in extension.ts file as it is hard to find which function is getting modified.
Thanks for your review, you caught some important issues. For the refactor, I've made a separate issue to track this so it can be done in another PR: #1917 |
Resolves #1866
#1858 (does not add api, we decide to do this automatically)
The
VersionResolver
class makes a web-request before downloading .NET to find the newest version of .NET to keep users up to date. The problem is, this resolution of which version of .NET to download occurs before when we check the pre-existing installations to see if we need to do an installation at all, because we need to resolve a version string such as '8.0' to '8.0.2'.If the user had downloaded the .NET before hand then went on an airplane, which many have, it would not check if that install exists because it'd first see if there is a newer version to download then fail.
This adds a check where if we are offline we check the preexisting installs first to prevent this failure from occurring.
Previous Behavior:
It would wait for the timeout silently and then fail.
See users reporting this in microsoft/vscode-dotnettools#1028 which this resolves.
New Behavior:
For the first 2 requests, I request '7.0' which was installed previously. It uses the old existing install and remarks to update when possible.
For the next request, I request '8.0' which was not installed previously. It has a new warning message instead of hanging and will wait..
When connecting back to the internet, it works again.