Skip to content

[browser] Wasm SDK packed as a nuget package - #84082

Merged
maraf merged 18 commits into
dotnet:mainfrom
maraf:WasmSdkPackaged
Apr 12, 2023
Merged

[browser] Wasm SDK packed as a nuget package#84082
maraf merged 18 commits into
dotnet:mainfrom
maraf:WasmSdkPackaged

Conversation

@maraf

@marafmaraf commented Mar 29, 2023

Copy link
Copy Markdown
Member

Produce a Microsoft.NET.Sdk.WebAssembly.Pack package containing most of the Wasm SDK bits.

Contributes to #81367

@marafmaraf added arch-wasm WebAssembly architecture area-Build-mono labels Mar 29, 2023
@marafmaraf added this to the 8.0.0 milestone Mar 29, 2023
@marafmaraf self-assigned this Mar 29, 2023
@ghost

Copy link
Copy Markdown

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

Issue Details
  • TBD
Author:maraf
Assignees:maraf
Labels:

arch-wasm, area-Build-mono

Milestone:8.0.0

@steveisok
steveisok self-requested a review March 30, 2023 16:18
@lewing

Copy link
Copy Markdown
Member

kicked this over now that the baseline is green. Cursory reading looks fine, what is left to do?

@maraf
maraf marked this pull request as ready for review April 11, 2023 11:31
@radical

Copy link
Copy Markdown
Member

Just curious - why do we have Pack in the name?

@radicalradical left a comment

Copy link
Copy Markdown
Member

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.

Comment threadsrc/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs Outdated
[Output]
public ITaskItem[] FilesToRemove { get; set; }

public override bool Execute()

Copy link
Copy Markdown
Member

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:

try
{
ExecuteInternal();
return!Log.HasLoggedErrors;
}
catch(LogAsErrorExceptione)
{
Log.LogError(e.Message);
returnfalse;
}

This would make the main method simpler, and allow use of

thrownewLogAsErrorException("Invalid number of project assemblies '{0}'",string.Join(","+Environment.NewLine,ProjectAssembly.Select(a =>a.ItemSpec)));

@marafmarafApr 12, 2023

Copy link
Copy Markdown
MemberAuthor

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

Comment threadsrc/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/FileHasher.cs Outdated
Comment threadsrc/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs Outdated
Comment on lines +14 to +15
<!-- Avoid having the rid show up in output paths -->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
MemberAuthor

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

@maraf

Copy link
Copy Markdown
MemberAuthor

Just curious - why do we have Pack in the name?

The Microsoft.NET.Sdk.WebAssembly is taken by tasks in the SDK repo https://github.com/dotnet/sdk/blob/767d13a675a2b03f22d36c1ae62a242cc9523603/src/WasmSdk/Tasks/Microsoft.NET.Sdk.WebAssembly.Tasks.csproj.

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.

This is the original PR dotnet/sdk#31154 that split common bits from Blazor SDK

@maraf

Copy link
Copy Markdown
MemberAuthor

Nupkg built on CI is correct

@lewing@steveisok@radical@pavelsavara Any more feedback? This is needed to unblock SDK change dotnet/sdk#31519

@maraf
maraf requested review from lewing and radicalApril 12, 2023 09:26

@steveisoksteveisok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@maraf
maraf merged commit 063adfe into dotnet:mainApr 12, 2023
@maraf
maraf deleted the WasmSdkPackaged branch April 12, 2023 15:38
lewing added a commit that referenced this pull request Apr 13, 2023
ViktorHofer pushed a commit that referenced this pull request Apr 13, 2023
maraf added a commit to maraf/runtime that referenced this pull request Apr 13, 2023
lewing pushed a commit that referenced this pull request Apr 14, 2023
* [browser] Wasm SDK packed as a nuget package (#84082)
* Update pattern for matching RidAgnosticNupkgToPublishFile to include Microsoft.NET.Sdk.WebAssembly.Pack
@ghostghost locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-Build-mono

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@maraf@lewing@radical@pavelsavara@steveisok