Skip to content
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

Merged
merged 18 commits into from
Apr 12, 2023
Merged

Conversation

maraf
Copy link
Member

@maraf maraf commented Mar 29, 2023

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

Contributes to #81367

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

ghost commented Mar 29, 2023

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
Member

lewing commented Apr 11, 2023

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
Member

radical commented Apr 11, 2023

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

Copy link
Member

@radical radical left a 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.

[Output]
public ITaskItem[] FilesToRemove { get; set; }

public override bool Execute()
Copy link
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 (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)));

Copy link
Member Author

@maraf maraf Apr 12, 2023

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 on lines +14 to +15
<!-- Avoid having the rid show up in output paths -->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Copy link
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
Member Author

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
Member Author

maraf commented Apr 12, 2023

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
Member Author

maraf commented Apr 12, 2023

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 radical and lewing April 12, 2023 09:26
Copy link
Member

@steveisok steveisok left a comment

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:main Apr 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
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants