Skip to content

[main] Source code updates from dotnet/runtime - #7872

Merged
dkurepa merged 15 commits into
mainfrom
darc-main-40e1985c-331d-4b00-86c5-568e395b64b6
Jul 24, 2026
Merged

dkurepa merged 15 commits into
mainfrom
darc-main-40e1985c-331d-4b00-86c5-568e395b64b6

Conversation

@dotnet-maestro

@dotnet-maestro dotnet-maestro Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Note

This is a codeflow update. It may contain both source code changes from
the source repo
as well as dependency updates. Learn more here.

This pull request brings the following source code changes

From https://github.com/dotnet/runtime

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/runtime:3a76b784148f79d59ac241c643643f57c517b3a3..https://github.com/dotnet/dotnet:darc-main-40e1985c-331d-4b00-86c5-568e395b64b6

@dotnet-maestro

Copy link
Copy Markdown
Contributor Author

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dkurepa

dkurepa commented Jul 21, 2026

Copy link
Copy Markdown
Member

looks like aspnet got broken by this FF. @wtgodbe can you take a look please?

@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team July 21, 2026 11:08
@dotnet-maestro

Copy link
Copy Markdown
Contributor Author

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dotnet-maestro

Copy link
Copy Markdown
Contributor Author

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@akoeplinger

Copy link
Copy Markdown
Member

src/aspnetcore/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSInProcessObjectReference.cs(71,13): error CA1416: This call site is reachable on all platforms. 'JSInProcessObjectReference.DisposeJSObjectReferenceById(long)' is only supported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

@lewing this is likely caused by dotnet/runtime#131055, note that we hit it in preview7 FF too: #7923

@lewing

lewing commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

src/aspnetcore/src/JSInterop/Microsoft.JSInterop/src/Implementation/JSInProcessObjectReference.cs(71,13): error CA1416: This call site is reachable on all platforms. 'JSInProcessObjectReference.DisposeJSObjectReferenceById(long)' is only supported on: 'browser'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

@lewing this is likely caused by dotnet/runtime#131055, note that we hit it in preview7 FF too: #7923

interesting, the warning is correct but kind of funny in the sense that it is true for the entire in process runtime

…System.IsBrowser()

Fixes CA1416 introduced by the runtime JSImportGenerator change (dotnet/runtime#131055) that stamps [SupportedOSPlatform("browser")] on generated [JSImport] partial stubs. Microsoft.JSInterop is a plain SDK library with warnings-as-errors, so the unguarded call to the generated DisposeJSObjectReferenceById partial tripped CA1416. Guarding with OperatingSystem.IsBrowser() is behavior-neutral since JSInProcessObjectReference is only constructed by the WASM in-process runtime.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 30f68f14-f3e6-47e5-8344-dffb2b3d1952
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team July 23, 2026 16:56
lewing and others added 4 commits July 23, 2026 16:24
…owser

Fixes CA1416 across Microsoft.JSInterop.WebAssembly and Microsoft.AspNetCore.Components.WebAssembly caused by the runtime JSImportGenerator SupportedOSPlatform("browser") change (dotnet/runtime#131055). These assemblies only run on the browser (Mono WebAssembly) runtime, so narrowing SupportedPlatform to browser resolves every generated [JSImport] call site at once.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 30f68f14-f3e6-47e5-8344-dffb2b3d1952
…ject NoWarn

The SupportedPlatform Remove/Include browser narrowing does not suppress CA1416 in this SDK. Replace it with a per-project NoWarn on Microsoft.JSInterop.WebAssembly and Microsoft.AspNetCore.Components.WebAssembly, which is zero-cascade (an attribute-based SupportedOSPlatform narrowing would cascade CA1416 into the host-side Components.WebAssembly.Server that references these assemblies). Addresses CA1416 from the runtime JSImportGenerator SupportedOSPlatform("browser") change (dotnet/runtime#131055).

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 30f68f14-f3e6-47e5-8344-dffb2b3d1952
@dotnet-maestro

Copy link
Copy Markdown
Contributor Author

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dkurepa
dkurepa merged commit eebb147 into main Jul 24, 2026
16 checks passed
@dkurepa
dkurepa deleted the darc-main-40e1985c-331d-4b00-86c5-568e395b64b6 branch July 24, 2026 08:40
mthalman pushed a commit to omajid/dotnet-dotnet that referenced this pull request Jul 24, 2026
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Djuradj Kurepa <[email protected]>
Co-authored-by: Larry Ewing <[email protected]>
Copilot-Session: 30f68f14-f3e6-47e5-8344-dffb2b3d1952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants