Skip to content

Linker regression in 7.0 (wasm) #3110

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

Closed
javiercn opened this issue Nov 11, 2022 · 9 comments
Closed

Linker regression in 7.0 (wasm) #3110

javiercn opened this issue Nov 11, 2022 · 9 comments
Milestone

Comments

@javiercn
Copy link
Member

javiercn commented Nov 11, 2022

On a Blazor webassembly app with authentication, the linker in 7.0 seems to be incorrectly trimming the getters of an object that we json serialize. This is the linked output in 7.0

This is the linked output in 6.0

This type is used is passed as an argument to JS interop calls, which are annotated as, so the getters should be preserved (as in 6.0)
https://github.com/dotnet/aspnetcore/blob/main/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs#L25 https://github.com/dotnet/aspnetcore/blob/main/src/Shared/LinkerFlags.cs#L13

If you want to reproduce it, you can use dotnet 7 and call dotnet new blazorwasm -au Individual -ho -o BlazorWasmAuth and run dotnet publish on the BlazorWasmAuth/Server project.

@ghost
Copy link

ghost commented Nov 11, 2022

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.

@javiercn
Copy link
Member Author

/cc @lewing

@agocke agocke removed the untriaged label Nov 11, 2022
@ghost
Copy link

ghost commented Nov 11, 2022

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Issue Details

On a Blazor webassembly app with authentication, the linker in 7.0 seems to be incorrectly trimming the getters of an object that we json serialize. This is the linked output in 7.0

This is the linked output in 6.0

This type is used is passed as an argument to JS interop calls, which are annotated as, so the getters should be preserved (as in 6.0)
https://github.com/dotnet/aspnetcore/blob/main/src/JSInterop/Microsoft.JSInterop/src/IJSRuntime.cs#L25 https://github.com/dotnet/aspnetcore/blob/main/src/Shared/LinkerFlags.cs#L13

Author: javiercn
Assignees: -
Labels:

untriaged, area-Tools-ILLink

Milestone: -

@agocke
Copy link
Member

agocke commented Nov 11, 2022

@javiercn Thanks for the bug report. Do you have an example of the call site as well?

@javiercn
Copy link
Member Author

@agocke
Copy link
Member

agocke commented Nov 11, 2022

@sbomer Could you take a look?

@agocke
Copy link
Member

agocke commented Nov 11, 2022

@javiercn I've been trying to repro this locally, but I can't seem to get the results you describe. Is there something else I need to pass to dotnet publish?

@marek-safar marek-safar transferred this issue from dotnet/runtime Nov 11, 2022
@marek-safar marek-safar added this to the .NET 7.0.x milestone Nov 11, 2022
@sbomer
Copy link
Member

sbomer commented Nov 11, 2022

@javiercn that callsite looks like it would preserve properties of RemoteAuthenticationResult but not RemoteAuthenticationContext - is there another callsite where you expect RemoteAuthenticationContext to be preserved for serialization?

@agocke
Copy link
Member

agocke commented Nov 22, 2022

Closing as it looks like this might not be a bug. If we get more info then we can re-open.

@agocke agocke closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants