Skip to content

Conversation

@pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Jul 28, 2021

The environment variables could be only set when the runtime is ready.
Fixes dotnet/runtime#55750

@pavelsavara pavelsavara self-assigned this Jul 28, 2021
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jul 28, 2021
@pavelsavara pavelsavara marked this pull request as ready for review July 29, 2021 08:01
@pavelsavara pavelsavara requested a review from a team as a code owner July 29, 2021 08:01
@pavelsavara pavelsavara requested a review from eerhardt July 29, 2021 08:02
Copy link
Member

@javiercn javiercn 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 to me!

Thanks for following through!

@pranavkm do you have any further thoughts?

@pranavkm
Copy link
Contributor

@lewing could you do a once-over to make sure this is the right change?

@radical
Copy link
Member

radical commented Jul 29, 2021

  • What changed that broke this?
  • Also, @pranavkm are there are "functional" tests, where the app is run? It would be useful to have a test like that for this case

@eerhardt
Copy link
Member

are there are "functional" tests, where the app is run? It would be useful to have a test like that for this case

+1

@eerhardt
Copy link
Member

What changed that broke this?

I'm pretty sure my change to fix dotnet/runtime#49391 exposed this bug in how environment variables are handled in WASM. I think this was always broken, but because the error was being eaten, no one noticed.

@lewing
Copy link
Member

lewing commented Jul 31, 2021

There is also dotnet/runtime#56667

@radical
Copy link
Member

radical commented Aug 1, 2021

@lewing
Copy link
Member

lewing commented Aug 4, 2021

What changed that broke this?

I'm pretty sure my change to fix dotnet/runtime#49391 exposed this bug in how environment variables are handled in WASM. I think this was always broken, but because the error was being eaten, no one noticed.

This is about the timing of the call that sets up the environment. Blazor has its own startup code and does a lot in preRun which is too early for some things (it actually triggers emscripten assertions if you enable them).

@pavelsavara pavelsavara merged commit 238fd13 into dotnet:main Aug 4, 2021
@ghost ghost added this to the 6.0-rc1 milestone Aug 4, 2021
@radical
Copy link
Member

radical commented Aug 4, 2021

There are E2E wasm tests, like https://github.com/dotnet/aspnetcore/blob/main/src/Components/test/E2ETest/Tests/WebAssemblyGlobalizationTest.cs . One for this case can be added there.

Is there a test that is already covering this, but was disabled?

@ghost
Copy link

ghost commented Aug 4, 2021

Hi @radical. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Blazor WASM] InvariantGlobalization causes error after upgrading to .Net 6 Preview 6

6 participants