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

Refresh features/record-structs with latest bits from main branch #52762

Merged
merged 274 commits into from
Apr 21, 2021

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Apr 20, 2021

All manual edits have been isolated into separate commits (the last ones): 46ec3ee and 1ecbcdd and 2a5f985

Youssef1313 and others added 11 commits April 19, 2021 17:00
…mework-targeting

Fix build of our .NET 2.0-targeting projects
* Use compile-time solution for solution crawler and EnC

* Only remove design-time docs when enc config file is present

* Only enable when Razor LSP editor is enabled
…lignment

'Simplify interpolation' should not be suggested in VB for non-literal alignments
@jcouv jcouv added this to the C# 10 milestone Apr 20, 2021
@jcouv jcouv self-assigned this Apr 20, 2021
@jcouv jcouv requested a review from davidwengier April 20, 2021 03:43
@jcouv jcouv marked this pull request as ready for review April 20, 2021 14:54
@jcouv jcouv requested review from a team as code owners April 20, 2021 14:54
@@ -10667,13 +10667,15 @@ protected virtual bool PrintMembers(System.Text.StringBuilder builder)
Row(21, TableIndex.TypeRef, EditAndContinueOperation.Default),
Row(4, TableIndex.TypeSpec, EditAndContinueOperation.Default),
Row(3, TableIndex.StandAloneSig, EditAndContinueOperation.Default),
Row(10, TableIndex.MethodDef, EditAndContinueOperation.Default)); // R.PrintMembers
Row(10, TableIndex.MethodDef, EditAndContinueOperation.Default), // R.PrintMembers
Row(24, TableIndex.CustomAttribute, EditAndContinueOperation.Default));
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this attribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

By looking at what we emit, it is the NullableContextAttribute. This matches my expectation because the record-structs branch fixed nullability annotations on the synthesized PrintMembers.

But looking at the metadata reader (reader1) something looked off (index out of bounds). Talked to @davidwengier, but he's not sure what to expect (this may be the result of EnC doing row mappings...). Will check with @tmat

            EditAndContinueLogEntry temp = reader1.GetEditAndContinueLogEntries().Last();
            CustomAttribute temp2 = reader1.GetCustomAttribute((CustomAttributeHandle)temp.Handle);

Copy link
Member Author

Choose a reason for hiding this comment

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

Confirmed with Tomas that trying to get the attribute with reader1.GetCustomAttribute(...) is expected to fail.
He suggested that I add #nullable enable to the test to revert to previous behavior. Currently attribute changes are not considered supported by EnC.
Filed #52786

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

Changes under compilers LGTM

@jcouv jcouv merged commit 0b26fd0 into dotnet:features/record-structs Apr 21, 2021
@jcouv jcouv deleted the merge-main branch April 21, 2021 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.