Skip to content

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Jul 30, 2025

Erase attribute in PE
Disallow attribute in source
Verify round-tripping on extension block
Re-enable skipped tests

Addresses some of the follow-up issues tracked by #78963
Relates to test plan #76130

@jcouv jcouv self-assigned this Jul 30, 2025
@jcouv jcouv added Area-Compilers Feature - Extension Everything The extension everything feature labels Jul 30, 2025
@jcouv jcouv force-pushed the extensions-prototype branch 2 times, most recently from f3755e9 to 9deb8e6 Compare July 30, 2025 17:10
@jcouv jcouv force-pushed the extensions-prototype branch from 9deb8e6 to 9b0d740 Compare July 31, 2025 22:48
{
case SymbolKind.NamedType:
if (!((NamedTypeSymbol)member).IsExtension) // PROTOTYPE: Figure out what to do about extensions, if anything
if (!((NamedTypeSymbol)member).IsExtension) // Tracked by https://github.com/dotnet/roslyn/issues/78963 : Figure out what to do about extensions, if anything
Copy link
Member Author

Choose a reason for hiding this comment

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

📝 added tracking bullet to the issue ("do we need special handling in GetSymbolToLocationMap (scenario related to winobj files)")

@jcouv jcouv marked this pull request as ready for review July 31, 2025 23:30
@jcouv jcouv requested a review from a team as a code owner July 31, 2025 23:30
@jcouv jcouv requested a review from jjonescz July 31, 2025 23:30
@AlekseyTs
Copy link
Contributor

AlekseyTs commented Aug 1, 2025

    .event [mscorlib]System.Action Event2

Perhaps it is worth adding the marker attribute to the event and its accessors #Closed


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:4490 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

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.

LGTM (commit 1)

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Aug 1, 2025

    // tuple names don't go into grouping types

It looks like this test and the tests below do not test this fact. They test that things are merged, but do not actually test if the names are in metadata for the grouping type. So, if that was the intent of the test, it was not achieved. In order to achieve it, we could get to the PENamedTypeSymbol representing the grouping type in metadata. Our implementation gets grouping name from that symbol, for example. #Closed


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:25506 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

@jcouv
Copy link
Member Author

jcouv commented Aug 1, 2025

    .event [mscorlib]System.Action Event2

In addressing this, I realized the event is malformed. The accessors in .addon and .removeon below need to be qualified (it's pointing to wrong method). Fixed


In reply to: 3142036745


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:4490 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

@jcouv
Copy link
Member Author

jcouv commented Aug 1, 2025

    // tuple names don't go into grouping types

Adjusted comment


In reply to: 3145111607


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:25506 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

@jcouv jcouv merged commit d2699a1 into dotnet:features/extensions Aug 1, 2025
24 checks passed
@jcouv jcouv deleted the extensions-prototype branch August 1, 2025 18:30
@AlekseyTs
Copy link
Contributor

AlekseyTs commented Aug 2, 2025

    .event [mscorlib]System.Action Event2

The response sounds like the attribute has been added? but I do not see any changes like that.


In reply to: 3145147928


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:4490 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

@AlekseyTs
Copy link
Contributor

    .event [mscorlib]System.Action Event2

Actually, I see a new test added with the attributes


In reply to: 3146130980


Refers to: src/Compilers/CSharp/Test/Emit3/Semantics/ExtensionTests2.cs:4490 in 9b0d740. [](commit_id = 9b0d740, deletion_comment = False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Extension Everything The extension everything feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants