-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[browser] Wasm SDK packed as a nuget package #84082
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/Microsoft.NET.Sdk.WebAssembly.Pack.pkgproj
Outdated
Show resolved
Hide resolved
kicked this over now that the baseline is green. Cursory reading looks fine, what is left to do? |
Just curious - why do we have |
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.
Just some comments at a glance. I'm guessing that most of the code is being moved from elsewhere (could you point to the original sources?), so I didn't really review in detail.
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
Outdated
Show resolved
Hide resolved
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs
Outdated
Show resolved
Hide resolved
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs
Outdated
Show resolved
Hide resolved
[Output] | ||
public ITaskItem[] FilesToRemove { get; set; } | ||
|
||
public override bool Execute() |
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.
nit: I would suggest renaming this to ExecuteInternal
, called by Execute
which has:
runtime/src/tasks/WasmAppBuilder/ManagedToNativeGenerator.cs
Lines 55 to 64 in 19ff978
try | |
{ | |
ExecuteInternal(); | |
return !Log.HasLoggedErrors; | |
} | |
catch (LogAsErrorException e) | |
{ | |
Log.LogError(e.Message); | |
return false; | |
} |
This would make the main method simpler, and allow use of
throw new LogAsErrorException("Invalid number of project assemblies '{0}'", string.Join("," + Environment.NewLine, ProjectAssembly.Select(a => a.ItemSpec)));
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.
I'll do it in follow-up PR. I would like to focus on the functional part at the moment
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/FileHasher.cs
Outdated
Show resolved
Hide resolved
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/Microsoft.NET.Sdk.WebAssembly.Pack.pkgproj
Outdated
Show resolved
Hide resolved
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs
Outdated
Show resolved
Hide resolved
<!-- Avoid having the rid show up in output paths --> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> |
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.
What's the reason for this?
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.
It's taken from blazor. I would like to be as similar as possible
The
This is the original PR dotnet/sdk#31154 that split common bits from Blazor SDK |
Nupkg built on CI is correct @lewing @steveisok @radical @pavelsavara Any more feedback? This is needed to unblock SDK change dotnet/sdk#31519 |
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.
Looks good!
* [browser] Wasm SDK packed as a nuget package (#84082) * Update pattern for matching RidAgnosticNupkgToPublishFile to include Microsoft.NET.Sdk.WebAssembly.Pack
Produce a
Microsoft.NET.Sdk.WebAssembly.Pack
package containing most of the Wasm SDK bits.Contributes to #81367