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

C#: Lift models. #16484

Merged
merged 8 commits into from
May 28, 2024
Merged

Conversation

michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented May 14, 2024

In this PR we align the C# model generator lifting and override logic with Java.
That is,

  • Models are now lifted to the top base class within the source code. However, we exclude Object and ValueType as this causes issues when generating models for .NET runtime (as these class definitions are included in the .NET runtime source code).
  • The extensible logic is changed; We now say that models should apply to all overrides with the exception of overrides of methods defined on Object and ValueType (as class or value type implicitly extend these).

Furthermore, we also make a small fix related to sink model discovery. We only want to exclude generation of these, if there exist a neutral sink model (and not a neutral summary model).

@@ -0,0 +1,18 @@
private import csharp as Cs

Check warning

Code scanning / CodeQL

Names only differing by case Warning

Cs is only different by casing from CS that is used elsewhere for modules.
@michaelnebel michaelnebel force-pushed the csharp/superimplmodelgen branch 2 times, most recently from ce24cbe to c2796a9 Compare May 15, 2024 13:18
Copy link
Contributor

github-actions bot commented May 16, 2024

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. A recent commit removed the previously reported differences.

@michaelnebel michaelnebel force-pushed the csharp/superimplmodelgen branch 2 times, most recently from 39cc38a to 8c6dcbc Compare May 22, 2024 09:19
@github-actions github-actions bot removed the Java label May 22, 2024
@michaelnebel michaelnebel force-pushed the csharp/superimplmodelgen branch 7 times, most recently from bca48ac to ab3ad36 Compare May 24, 2024 07:22
@michaelnebel michaelnebel added the no-change-note-required This PR does not need a change note label May 24, 2024
@michaelnebel michaelnebel marked this pull request as ready for review May 24, 2024 10:54
@michaelnebel michaelnebel requested a review from a team as a code owner May 24, 2024 10:54
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

@michaelnebel michaelnebel requested a review from hvitved May 28, 2024 11:56
@michaelnebel michaelnebel merged commit 195ccb0 into github:main May 28, 2024
20 checks passed
@michaelnebel michaelnebel deleted the csharp/superimplmodelgen branch May 28, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants