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

Nullness :: Bugfix :: Codegen missing metadata for C# consumers (records,DUs,exceptions) #18079

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Nov 27, 2024

Fixes #18007
Fixes #18076
Fixes #18077
Fixes #18078

This address holes in metadata generation for C# consumers of nullness information.
Affected areas are:

  • Constructor arguments for records, DUs and exception
  • Properties of records
  • get_ methods in records
  • Exception types - constructors, properties, get_Methods
  • DU constructor arguments for root type
  • DU constructor arguments for subclasses representing DU cases
  • For selected areas of DU codegen, metadata has been added to fields (even though they are generated as internal)

I spotted a pre-existing nasty bug which caused method attributes overwrite each other, and compilergenerated and debuggersteptrough attributes were until now therefore missing for selected generated methods in subclasses of DUs.

IMPORTANT tip for reviewing:

The attribute codegen fix also meant changing a lot of baselines, even though the only materialchange is addition of the two attributes.
All the baselines which are not about nullness have been updated in a separate commit, so that you can focus on the rest.

@T-Gro T-Gro linked an issue Nov 27, 2024 that may be closed by this pull request
7 tasks
Copy link
Contributor

❗ Release notes required

@T-Gro,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX))

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

You can open this PR in browser to add release notes: open in github.dev

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/9.0.200.md No release notes found or release notes format is not correct

@T-Gro T-Gro marked this pull request as ready for review November 28, 2024 09:19
@T-Gro T-Gro requested a review from a team as a code owner November 28, 2024 09:19
@T-Gro T-Gro added this to the November-2024 milestone Nov 28, 2024
@T-Gro T-Gro self-assigned this Nov 28, 2024
@T-Gro T-Gro modified the milestones: November-2024, December-2024 Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment