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

Bugfix: Consuming [CliEvent] events from C#, if there are multiple types in a module and ref assemblies are used. #16218

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Nov 2, 2023

Fixes #14996 .

The issue was caused by reference assembly generation, which is on by default for net7+, and was not on for <TargetFramework>6.0</..>.

The fix addresses the issue with ordering of operations in ilwrite that depend on a read/write shared state (cenv).

Visual proof of the wrong codegen before for two types, each having 1 event.
Error is that codegen puts both events into one type, instead of one event for each:
image

After the fix, += from C# works as everything is codegen'd at the right type:
image

@T-Gro T-Gro requested a review from a team as a code owner November 2, 2023 10:30
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
4 participants