Skip to content

[WASI] Continuable WASI SDK download using curl on Windows#119325

Merged
pavelsavara merged 4 commits intodotnet:mainfrom
SingleAccretion:WASI-SDK-Proj-Cur
Sep 4, 2025
Merged

[WASI] Continuable WASI SDK download using curl on Windows#119325
pavelsavara merged 4 commits intodotnet:mainfrom
SingleAccretion:WASI-SDK-Proj-Cur

Conversation

@SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Sep 3, 2025

See discussion here: #119253 (comment).

Tested locally to indeed resolve the corruption/partial download issue.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 3, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 3, 2025
@jkotas jkotas requested a review from pavelsavara September 3, 2025 16:20
@jkotas jkotas added os-wasi Related to WASI variant of arch-wasm area-Infrastructure-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 3, 2025
@SingleAccretion SingleAccretion marked this pull request as ready for review September 3, 2025 16:20
@xtqqczze
Copy link
Contributor

xtqqczze commented Sep 3, 2025

The partial download issue is probably: PowerShell/PowerShell#17931, which was fixed in PowerShell v7.4.0.

Nevertheless, eng/AcquireWasiSdk.targets appears to employ Windows PowerShell, which was released in 2016.

@xtqqczze
Copy link
Contributor

xtqqczze commented Sep 3, 2025

Should we first check whether curl is available, it was only added in Windows build 17063.

.NET 10.0 - Supported OS versions indicates we still support all the way back to Windows Server 2012 (build 9200).

@SingleAccretion
Copy link
Contributor Author

SingleAccretion commented Sep 3, 2025

Should we first check whether curl is available, it was only added in Windows build 17063.

Let's see. I would hope the CI build machines that are used for WASI are new enough.

@pavelsavara pavelsavara self-assigned this Sep 3, 2025
@SingleAccretion SingleAccretion changed the title [WASI] Continuable download using curl on Windows [WASI] Continuable WASI SDK download using curl on Windows Sep 3, 2025
@xtqqczze
Copy link
Contributor

xtqqczze commented Sep 3, 2025

Should we first check whether curl is available, it was only added in Windows build 17063.

Let's see. I would hope the CI build machines that are used for WASI are new enough.

If this only runs on CI and not locally, then that’s not an issue. In that case, you could have probably used pwsh instead of powershell to use the maintained PowerShell instead of legacy Windows PowerShell.

@SingleAccretion
Copy link
Contributor Author

SingleAccretion commented Sep 3, 2025

If this only runs on CI and not locally, then that’s not an issue

It runs when you try to build some WASI-related component (mostly native code). There are not that many people interested in building dotnet/runtime targeting WASI on Windows. I suspect none of them are running particularly old OS versions. If that turns out to be an incorrect assumption, we can augment the code then.

@xtqqczze
Copy link
Contributor

xtqqczze commented Sep 3, 2025

It runs when you try to build some WASI-related component (mostly native code). There are not that many people interested in building dotnet/runtime targeting WASI on Windows.

For future reference, the curl implementation could be made conditional on:

[Environment]::OSVersion.Version.Build -ge 17063

otherwise fallback to Invoke-WebRequest.

@pavelsavara
Copy link
Member

pavelsavara commented Sep 4, 2025

It worked just fine :)

image

edit: I made it silent

@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Sep 4, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@pavelsavara pavelsavara merged commit 07178b3 into dotnet:main Sep 4, 2025
162 checks passed
@SingleAccretion SingleAccretion deleted the WASI-SDK-Proj-Cur branch September 4, 2025 16:22
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Infrastructure-mono community-contribution Indicates that the PR has been added by a community member os-wasi Related to WASI variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants