Closed javiercn closed 1 year ago
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.
/cc @lewing
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas See info in area-owners.md if you want to be subscribed.
Author: | javiercn |
---|---|
Assignees: | - |
Labels: | `untriaged`, `area-Tools-ILLink` |
Milestone: | - |
@javiercn Thanks for the bug report. Do you have an example of the call site as well?
@sbomer Could you take a look?
@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
?
@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?
Closing as it looks like this might not be a bug. If we get more info then we can re-open.
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![](https://user-images.githubusercontent.com/6995051/201389145-7badc5f6-825c-4ad8-b816-e5b7c393159c.png)
This is the linked output in 6.0![](https://user-images.githubusercontent.com/6995051/201389153-05bd8006-0110-4dce-961d-f9a109d1490a.png)
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 theBlazorWasmAuth/Server
project.