-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix #32, Replace https get with undici client.stream in download.mts #47
Conversation
…wnload.mts Improves performance and fixes stalled downloads on some systems
Thanks for this - just adding a .vsix to this PR, and then I'll go test it on all my systems to check there are no regressions |
Couple of bug fixes in main which I've merged in, and I fixed some error handling when it downloads the toolchain. Tested on MacOS, RPiOS, and my Windows 11 and seems to work great - @mattmyne could you double check the latest version still fixes the problem for you, and then I'll merge this in? You can download the .vsix from https://github.com/raspberrypi/pico-vscode/actions/runs/10526534058 |
This works for me. Removed everything (extension, .pico-sdk and temp files) and installed this .vsix. Selected a New Project from Example and everything downloaded and installed in <5 minutes. Almost - there were a couple of issues but neither of them are related to this issue/PR. The first toolkit download attempt actually failed but the logs show this was a git-related rather than plain download issues. Repeated "fetch-pack: unexpected disconnect while reading sideband packet" git clone errors. Without changing anything I just tried again and it all worked so I'm putting it down to flaky git cloning, but I've included the whole error list if it helps for future issues. The second issue is that when opening the newly-created project file, I now get: Anyway - this PR does fix the download issue I had, thanks. |
As above, here's the git clone related error message:
|
I've seen these issues sometimes when I have a dodgy Wi-fi connection, so I think they're unrelated to the extension, just an issue with git cloning on with unreliable internet |
The As for |
And thanks very much for your work on this PR! I'll merge it now |
Just to follow-up on the missing include, it was related to that first git clone error. The SDK download/cloning must have been interrupted before the cyw43_arch related files had been created, but since the SDK folder wasn't empty the second attempt skipped it assuming it was installed ok. Deleting the SDK folder and re-running the New Project From Example command cloned everything correctly and the include error has gone. I did this using the above .vsix install, so no issues there. |
Replacing https get with client.stream from the undici library improves performance and fixes stalled downloads on some systems.
Only updates src/utils/download.mts, though replacement in all files could be done if required in the future.