Skip to content

Merge blazor-wasm -> 3.1 #21921

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

Merged
merged 355 commits into from
Jun 10, 2020
Merged

Merge blazor-wasm -> 3.1 #21921

merged 355 commits into from
Jun 10, 2020

Conversation

pranavkm
Copy link
Contributor

No description provided.

dotnet-maestro bot and others added 30 commits February 13, 2020 12:20
…203.1 (#19017)

- Microsoft.AspNetCore.Blazor.Mono - 3.2.0-preview1.20103.1
…213.5 (#19034)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.20113.5
- Microsoft.DotNet.GenAPI - 1.0.0-beta.20113.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.20113.5
…213.1 (#19039)

- Microsoft.AspNetCore.Blazor.Mono - 3.2.0-preview1.20113.1
* Add service worker

* Add manifest

* Bring back BaselineTest.cs

* Add baselines for blazorwasm templates

* Add publishing test for PWA template

* Baseline fixes

* Fix baseline test logic to allow for multi-project outputs

* Remove non-blazorwasm baselines, since this branch now only covers blazorwasm

* Add test for PWA publish output

* Beginning generation of assets manifest

* Generate assets manifest including blazor outputs

* Tweaks

* Write assets manifest in JSON form

* Publish service worker

* Better API

* More resilience

* Better API again

* Make ComputeBlazorAssetsManifestItems public as people will need to customize the list

* Exclude service worker files from assets manifest

* Use web standard format for hash

* Update project template

* In assets manifest, only include items being published

* Renames

* Compute default assets manifest version by combining hashes

* Emit sw manifest in .js form

* Update service worker in project

* Actually isolate browser instances when requested during E2E tests

* E2E test for published PWA operating offline

* Fix SWAM path in template

* Clarify targets
when attempting to enable client debugging on blazor-wasm an attempt to
provide a helpful message casues an ¨Unknown OS platform¨ exception

relates to #16366 #12970
* Adds a Microsoft.AspNetCore.Components.WebAssembly.Authentication
  library for performing authentication in Blazor webassembly.
* Includes a default implementation that supports OIDC capable IdPs
  using oidc-client.js
* Includes multiple primitives to deal with authentication flows and
  supports acquiring access tokens to call APIs.
  * RemoteAuthenticatorView is responsible for handling authentication
    operations at the user interface level.
  * RemoteAuthenticatorService is responsible for handling the lower
    level authentication details by using JavaScript interop to interact
    with the underlying javascript library implementing the auth protocol.
  * SignOutSessionStateManager handles CSRF protection for the logout
    path.
  * IAccessTokenProvider handles provisioning access tokens to call APIs.
* [Blazor] Adds a project template option for individual auth
* Handles hosted scenarios with Identity Server.
* Handles non-hosted scenarios with oidc-client.js.
* Handles AAD and B2C scenarios with an MSAL library (disabled for now).
* Adds additional scenarios to address #17011
* Include commit hash so we can track the build of Blazor WASM associated with a perf run
* Port some infrastructure fixes from master

Fixes #17011
* Make the dev-server log less
* Allow loading a user configured settings file
* [Blazor] Move Blazor to use Static Web Assets
* Plugs-in Blazor wasm through the static web assets infrastructure.
* Avoids the need for a custom Blazor.config file.
* Removes broken auto-rebuild and debug support.
* Removes unnecessary server-side Blazor helpers.
* Rename Blazor.Mono -> Components.WebAssembly.Runtime
* Update launchSettings.json for BlazorWASM

* Remove the `useWebAssemblyDebugging` setting as its no longer needed
…219.1 (#19167)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20119.1
…219.2 (#19169)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20119.2
Move to MapBlazorWebAssemblyApplication as the way to map blazor files into a hosted application.
…19119)

* [Blazor][Wasm] Move HttpClient from default services to extension method (#16929)

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <[email protected]>
…220.1 (#19210)

- Microsoft.AspNetCore.Components.WebAssembly.Runtime - 3.2.0-preview2.20120.1
@pranavkm pranavkm force-pushed the prkrishn/merge-blazor-wasm branch from b7c59d4 to 53edc76 Compare May 27, 2020 15:59
@pranavkm
Copy link
Contributor Author

@dotnet/aspnet-blazor-eng I made a few quality of improvements along with the change to using the non-sandboxed chrome. These should be the two commits that weren't previously part of the blazor-wasm branch:

Would you mind reviewing those?

@dotnet/aspnet-build could one of you look at the changes to the build infrastructure?

@@ -140,8 +140,11 @@ private async Task<(IWebDriver browser, ILogs log)> CreateBrowserAsync(string co
opts.AddArgument("--headless");
}

opts.AddArgument("--no-sandbox");
Copy link
Member

Choose a reason for hiding this comment

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

This is fair I think. Do you know of any downsides of doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find anything that would affect the test. Here's what chromioum had to say about it: https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox_faq.md#What-is-the-sandbox

* Fix logging config and output redirection in DebugProxy
* Log all messages from DebugProxy
<Project>
<!--
Importing this file is equivalent to having:
<PackageDependency Include="Microsoft.AspNetCore.Blazor.Build" />
Copy link
Member

Choose a reason for hiding this comment

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

Nit, should be PackageReference instead of PackageDependency

@wtgodbe
Copy link
Member

wtgodbe commented May 27, 2020

@pranavkm what infra stuff in particular do you want reviewed?

@pranavkm
Copy link
Contributor Author

Anything in the .azure \ eng directories.

@pranavkm pranavkm added the * NO MERGE * Do not merge this PR as long as this label is present. label May 27, 2020
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

My comments likely overlap the merge into master, either because I duplicated the comments in #22296 or because I should have duplicated the comments there.

Some comments, especially around build reliability and JSON syntax errors, need to be addressed before merging.

<AssemblyVersion>0.2.2.0</AssemblyVersion>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
Copy link
Contributor

Choose a reason for hiding this comment

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

  • On the $(AssemblyVersion) setting, huh❔
  • On the $(ProduceOnlyReferenceAssembly) settting, why does this project build a reference assembly at all, let alone only❔
  • On the $(StrongNameKeyId) setting, signing isn't going to happen inline with our builds in the near future; not sure this will be honoured even now. Probably need to update eng/Signing.props for this ref/ assembly to be correctly signed.
  • Here, why shouldn't this project and others with this setting be referencable using a @(Reference) item❔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're shipping a ref assembly for an assembly that ships in WASM in 3.2 since they didn't have the build infrastructure ready and there were some open questions about the package's naming. These values were set to mimic the runtime assembly. Since it's a reference assembly, it's built with using IncludeAssets="Compile" which Reference doesn't appear to support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we expect strong name signing to change in 3.1? This is going away in 5.0, so this isn't a long term problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point about the signing change being specific to 5.0. I'm still unsure this will work correctly and suggest some thorough validation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looked fine when I checked. We also have the option of just referencing the package if we absolutely needed to. The ref assembly is very small - https://github.com/dotnet/aspnetcore/blob/blazor-wasm/src/Components/WebAssembly/WebAssemblyHttpHandler/src/Microsoft.AspNetCore.Components.WebAssembly.HttpHandler.netstandard2.1.cs and isn't really meant to change

Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we ever ship a ref/ assembly for something outside the shared framework? And, where's the implementation project?

This would be a very useful follow-up item because it doesn't fit w/ how the rest of this branch is built. Plus that needs to change yet-again (removing almost all *.Manual.cs files) soon and you won't get the benefits of the simplified results.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the added information. We might be able to use more consistent infrastructure to build this but I leave the priority for that to you and others.

<AssemblyVersion>0.2.2.0</AssemblyVersion>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
Copy link
Contributor

Choose a reason for hiding this comment

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

Good point about the signing change being specific to 5.0. I'm still unsure this will work correctly and suggest some thorough validation.

@pranavkm pranavkm force-pushed the prkrishn/merge-blazor-wasm branch from fe8865a to 11ac23c Compare June 9, 2020 05:19
@pranavkm
Copy link
Contributor Author

pranavkm commented Jun 9, 2020

think I updated the yml files per your instructions. Could you have another look?

@pranavkm
Copy link
Contributor Author

pranavkm commented Jun 9, 2020

@dougbu bump.

@dougbu
Copy link
Contributor

dougbu commented Jun 10, 2020

/ack looking…

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Works for me. If you want to cover anything unresolved now, party on. Otherwise, ping me and I'll merge for you.

<AssemblyVersion>0.2.2.0</AssemblyVersion>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we ever ship a ref/ assembly for something outside the shared framework? And, where's the implementation project?

This would be a very useful follow-up item because it doesn't fit w/ how the rest of this branch is built. Plus that needs to change yet-again (removing almost all *.Manual.cs files) soon and you won't get the benefits of the simplified results.

@pranavkm
Copy link
Contributor Author

Why did we ever ship a ref/ assembly for something outside the shared framework? And, where's the implementation project?

Because Mono didn't have the infrastructure and we had to get the feature to our users. The implementation is part of the mono/mono repo.

@pranavkm
Copy link
Contributor Author

@dougbu \ @wtgodbe \ @mkArtakMSFT could one of you merge this for me?

@pranavkm pranavkm removed the * NO MERGE * Do not merge this PR as long as this label is present. label Jun 10, 2020
@wtgodbe
Copy link
Member

wtgodbe commented Jun 10, 2020

@pranavkm merge-commit, right?

@pranavkm
Copy link
Contributor Author

Yes please

@wtgodbe wtgodbe merged commit 432dc97 into release/3.1 Jun 10, 2020
@wtgodbe wtgodbe deleted the prkrishn/merge-blazor-wasm branch June 10, 2020 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.