-
Notifications
You must be signed in to change notification settings - Fork 92
Use local files on connection failure, closes #298 #299
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
Conversation
Ping @Meowcolm024 @runeksvendsen I would love to hear your feedback on this if you have time |
Very much thanks for the pr, it will improve the user experience a lot. |
The difference between the second and the third option is that the former is implemented, the latter would require some extra work - which I'm willing to put in, in any case. |
Another point: I'm reading #272 and it seems the current code could use some validation of the json result returned from github, since it, as written, now writes a potentially malformed result to disk. I first thought to maybe use a simple json schema to validate, but after researching the vscode environment, it seems one would have to include rather big dependencies to do that. Something like avj is quite a big dependency, a little bit smaller io-ts, which at least doesn't have any transitive dependencies. Then there's two very small and also small but probably not well maintained libraries. Honestly, I'd rather just write the logic directly inline. Any opinions on that? |
more light-weight than using a fully fledged library like avj, and most likely more than sufficient to handle edge cases.
I would say that inline would be better if the code is small enough, but I am not an expert in js/ts |
Shouldn't save too much bandwidth, but why not? Also fix default option
Thanks for doing this, looks great |
Use already downloaded tools when fetching latest release metadata fails. This adds a small cache file in the
globalStoragePath
containing the last fetched information.Does not currently implement the feature as requested in #281 as I'm not certain what exactly such a flag should do (pick one):
"haskell.hlsUpdateBehavior": "keep-up-to-date"
Try to fetch latest release information, if that fails fall back to local cache (what is done with this PR automatically)"haskell.hlsUpdateBehavior": "prompt"
Try to fetch latest release information, but not upgrade, even if it succeeds and instead display a prompt to update (probably sensible), still download artifacts for the proper ghc version, if necessary."haskell.hlsUpdateBehavior": "never-check"
Don't check for latest release information, and do not upgrade, but still download artifacts for missing ghc versions, if needed.I would want to implement #281 in this PR if that behavior is cleared up for me :)