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

[wasm] improve Wasm.Build.Tests to expect System.Globalization.CultureNotFoundException #55838

Closed
pavelsavara opened this issue Jul 16, 2021 · 3 comments · Fixed by #56121
Closed
Assignees
Labels
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Jul 16, 2021

This change is possibly hiding other issues.
8c503e1

  • It would be better to catch explicitly System.Globalization.CultureNotFoundException in appropriate scenarios.
  • Also, it would be great to cover behaviour of PredefinedCulturesOnly flag in linker.

This is exception I observed when I reverted the linked change

[wasm test-browser] fail: Error: System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
[wasm test-browser] es-ES is an invalid culture identifier.
[wasm test-browser]    at System.Globalization.CultureInfo..ctor(String , Boolean ) in System.Private.CoreLib.dll:token 0x6000fed+0x1f
[wasm test-browser]    at TestClass.Main() in invariant_True.dll:token 0x6000001+0x1
[wasm test-browser]     at Object._convert_exception_for_method_call (http://127.0.0.1:64656/dotnet.js:1:175823)
[wasm test-browser]     at Object._handle_exception_for_call (http://127.0.0.1:64656/dotnet.js:1:177792)
[wasm test-browser]     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:64656/dotnet.js:1:178113)
[wasm test-browser]     at Object._call_method_with_converted_args (http://127.0.0.1:64656/dotnet.js:1:179187)
[wasm test-browser]     at Object.call_method (http://127.0.0.1:64656/dotnet.js:1:177582)
[wasm test-browser]     at http://127.0.0.1:64656/dotnet.js:1:185292
[wasm test-browser]     at Object.call_assembly_entry_point (http://127.0.0.1:64656/dotnet.js:1:185525)
[wasm test-browser]     at Object.init (http://127.0.0.1:64656/runtime.js:356:24)
[wasm test-browser]     at Object.Module.config.loaded_cb (http://127.0.0.1:64656/runtime.js:243:8)
[wasm test-browser]     at Object._finalize_startup (http://127.0.0.1:64656/dotnet.js:1:136358)
[wasm test-browser] info: WASM EXIT 1
[wasm test-browser] fail: Application has finished with exit code TESTS_FAILED but 42 was expected
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Jul 16, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jul 16, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Jul 16, 2021

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

Issue Details

This change is possibly hiding other issues.
8c503e1

  • It would be better to catch explicitly System.Globalization.CultureNotFoundException in appropriate scenarios.
  • Also, it would be great to cover behaviour of PredefinedCulturesOnly flag in linker.

This is exception I observed when I reverted the linked change

[wasm test-browser] fail: Error: System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
[wasm test-browser] es-ES is an invalid culture identifier.
[wasm test-browser]    at System.Globalization.CultureInfo..ctor(String , Boolean ) in System.Private.CoreLib.dll:token 0x6000fed+0x1f
[wasm test-browser]    at TestClass.Main() in invariant_True.dll:token 0x6000001+0x1
[wasm test-browser]     at Object._convert_exception_for_method_call (http://127.0.0.1:64656/dotnet.js:1:175823)
[wasm test-browser]     at Object._handle_exception_for_call (http://127.0.0.1:64656/dotnet.js:1:177792)
[wasm test-browser]     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:64656/dotnet.js:1:178113)
[wasm test-browser]     at Object._call_method_with_converted_args (http://127.0.0.1:64656/dotnet.js:1:179187)
[wasm test-browser]     at Object.call_method (http://127.0.0.1:64656/dotnet.js:1:177582)
[wasm test-browser]     at http://127.0.0.1:64656/dotnet.js:1:185292
[wasm test-browser]     at Object.call_assembly_entry_point (http://127.0.0.1:64656/dotnet.js:1:185525)
[wasm test-browser]     at Object.init (http://127.0.0.1:64656/runtime.js:356:24)
[wasm test-browser]     at Object.Module.config.loaded_cb (http://127.0.0.1:64656/runtime.js:243:8)
[wasm test-browser]     at Object._finalize_startup (http://127.0.0.1:64656/dotnet.js:1:136358)
[wasm test-browser] info: WASM EXIT 1
[wasm test-browser] fail: Application has finished with exit code TESTS_FAILED but 42 was expected
Author: pavelsavara
Assignees: radical
Labels:

arch-wasm

Milestone: -

@lewing lewing added this to the 7.0.0 milestone Jul 16, 2021
@lewing lewing added area-System.Globalization and removed untriaged New issue has not been triaged by the area owner labels Jul 16, 2021
@ghost
Copy link

ghost commented Jul 16, 2021

Tagging subscribers to this area: @tarekgh, @safern
See info in area-owners.md if you want to be subscribed.

Issue Details

This change is possibly hiding other issues.
8c503e1

  • It would be better to catch explicitly System.Globalization.CultureNotFoundException in appropriate scenarios.
  • Also, it would be great to cover behaviour of PredefinedCulturesOnly flag in linker.

This is exception I observed when I reverted the linked change

[wasm test-browser] fail: Error: System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
[wasm test-browser] es-ES is an invalid culture identifier.
[wasm test-browser]    at System.Globalization.CultureInfo..ctor(String , Boolean ) in System.Private.CoreLib.dll:token 0x6000fed+0x1f
[wasm test-browser]    at TestClass.Main() in invariant_True.dll:token 0x6000001+0x1
[wasm test-browser]     at Object._convert_exception_for_method_call (http://127.0.0.1:64656/dotnet.js:1:175823)
[wasm test-browser]     at Object._handle_exception_for_call (http://127.0.0.1:64656/dotnet.js:1:177792)
[wasm test-browser]     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:64656/dotnet.js:1:178113)
[wasm test-browser]     at Object._call_method_with_converted_args (http://127.0.0.1:64656/dotnet.js:1:179187)
[wasm test-browser]     at Object.call_method (http://127.0.0.1:64656/dotnet.js:1:177582)
[wasm test-browser]     at http://127.0.0.1:64656/dotnet.js:1:185292
[wasm test-browser]     at Object.call_assembly_entry_point (http://127.0.0.1:64656/dotnet.js:1:185525)
[wasm test-browser]     at Object.init (http://127.0.0.1:64656/runtime.js:356:24)
[wasm test-browser]     at Object.Module.config.loaded_cb (http://127.0.0.1:64656/runtime.js:243:8)
[wasm test-browser]     at Object._finalize_startup (http://127.0.0.1:64656/dotnet.js:1:136358)
[wasm test-browser] info: WASM EXIT 1
[wasm test-browser] fail: Application has finished with exit code TESTS_FAILED but 42 was expected
Author: pavelsavara
Assignees: radical
Labels:

arch-wasm, area-System.Globalization

Milestone: 7.0.0

radical added a commit to radical/runtime that referenced this issue Jul 22, 2021
The following commit changed the behavior to throw `CultureNotFoundException`
when creating cultures in invariant mode.

```
commit 04dac7b
Author: Tarek Mahmoud Sayed <tarekms@microsoft.com>
Date:   Thu Jul 1 11:55:05 2021 -0700

    Allow restricting cultures creation with any arbitrary names in Globalization Invariant Mode (dotnet#54247)
```

This commit updates the corresponding test in `Wasm.Build.Tests` to
handle that explicitly.

Fixes dotnet#55838
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 22, 2021
radical added a commit that referenced this issue Jul 22, 2021
The following commit changed the behavior to throw `CultureNotFoundException`
when creating cultures in invariant mode.

```
commit 04dac7b
Author: Tarek Mahmoud Sayed <tarekms@microsoft.com>
Date:   Thu Jul 1 11:55:05 2021 -0700

    Allow restricting cultures creation with any arbitrary names in Globalization Invariant Mode (#54247)
```

This commit updates the corresponding test in `Wasm.Build.Tests` to
handle that explicitly.

Fixes #55838
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants