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] Satellite assemblies for localization are not used #107742

Closed
jeromelaban opened this issue Sep 12, 2024 · 10 comments · Fixed by #108190
Closed

[Wasm] Satellite assemblies for localization are not used #107742

jeromelaban opened this issue Sep 12, 2024 · 10 comments · Fixed by #108190
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Resources in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@jeromelaban
Copy link
Contributor

jeromelaban commented Sep 12, 2024

Description

When adding .withConfig({ loadAllSatelliteResources: true }), satellite assemblies are all downloaded and loaded by the runtime, but using resources from those satellites resources does not work properly.

Reproduction Steps

The following:

var r = new System.Resources.ResourceManager("FxResources.System.Web.Services.Description.SR", typeof(System.Web.Services.Description.Binding).Assembly);
Console.WriteLine($"Res(en): {r.GetString("WebDescriptionMissing", new CultureInfo("en-US"))}");
Console.WriteLine($"Res(fr): {r.GetString("WebDescriptionMissing", new CultureInfo("fr"))}");

Repro: 107742-testresources01.zip

Expected behavior

The second line should return french.

Actual behavior

Res(en): Cannot find definition for {0}.  Service Description with namespace {1} is missing.
Res(fr): Cannot find definition for {0}.  Service Description with namespace {1} is missing.

Regression?

Feels like it is, net8 got it available.

Known Workarounds

None.

Configuration

.NET 9 RC1

Other information

No response

@lewing lewing added this to the 10.0.0 milestone Sep 12, 2024
@lewing lewing added the arch-wasm WebAssembly architecture label Sep 12, 2024
@lewing
Copy link
Member

lewing commented Sep 12, 2024

should be fixed in #107398

@lewing lewing modified the milestones: 10.0.0, 9.0.0 Sep 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 12, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-resources
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

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

@jeromelaban
Copy link
Contributor Author

The issue is still present with today's rc2:

Installed Workload Id      Manifest Version                      Installation Source
------------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Sep 12, 2024
@lewing
Copy link
Member

lewing commented Sep 12, 2024

The issue is still present with today's rc2:

Installed Workload Id      Manifest Version                      Installation Source
------------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2

fix just merged, tomorrow's sdk should have it

@jeromelaban
Copy link
Contributor Author

@lewing I've tried RC2 again (9.0.100-rc.2.24468.2-win-x64)

Installed Workload Id      Manifest Version                     Installation Source
-----------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24468.6/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24468.6/9.0.100-rc.2      SDK 9.0.100-rc.2

And the issue is still present.

@maraf
Copy link
Member

maraf commented Sep 20, 2024

I'll take a look

@maraf
Copy link
Member

maraf commented Sep 24, 2024

It works with 9.0.100-rc.2.24473.20. Can you please validate it with this version?
I'm sorry, error in my setup. The problem still exists. It's related only to loadAllSatelliteResources=true. It can be bypassed by disabling fingerprinting (WasmFingerprintAssets=false) atm.

@jeromelaban Are you loading all satellites in production? It does load all cultures

@jeromelaban
Copy link
Contributor Author

@maraf yes, it's needed in production cases. Wouldn't it also affect partial eager loading of some languages?

@maraf
Copy link
Member

maraf commented Sep 24, 2024

No, it uses a different path in codebase. We have test coverage for his path. The loadAllSatelliteResources=true option was added mostly for runtime tests.

@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Sep 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Resources in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants