Skip to content

Changed generation of PrivateImplementationDetails to append module name... - #1546

Merged
VSadov merged 2 commits into
dotnet:masterfrom
VSadov:PIDname
Mar 25, 2015
Merged

VSadov merged 2 commits into
dotnet:masterfrom
VSadov:PIDname

Conversation

@VSadov

@VSadov VSadov commented Mar 24, 2015

Copy link
Copy Markdown
Member

... only when dealing with netmudules.

The goal of module name apending is to avoid clashes when combining multiple netmodules into multifile assembly. When building a regular assembly, appending module name is not serving any purpose and just causes unnecessary metadata differences.

Also in this change - when we do apend the module name, replace '.' with '_' when that happens. For example when we build a netmodule and its name is Foo.Bar.dll
More complicated name mangling schemes were discussed, but at this point we will do a simple '.' --> '_' as the least destabilizing change which is still sufficient in the most common case of having dots in the module name.

Fixes #1430

@VSadov

VSadov commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

@agocke @gafter @tmat - you may want to look at this change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should also be used at

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it is there. - GitHub lists this as the first changed file.

@gafter

gafter commented Mar 24, 2015

Copy link
Copy Markdown
Member

👍 though please note my comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Previously, the slot index was inside the angle brackets and instead of the module name. Does this matter? @tmat ?

@agocke

agocke commented Mar 25, 2015

Copy link
Copy Markdown
Member

Is there a test that actually tests the netmodule-merge case? I can't seem to find it.

@VSadov

VSadov commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

@agocke - there is a test added by Neal in last change. I did not need to change it. MultipleNetmodulesWithPrivateImplementationDetails

VSadov added 2 commits March 25, 2015 09:16
…ame only when dealing with netmudules.

The goal of module name apending is to avoid clashes when combining multiple netmodules into multifile assembly. When building a regular assembly, appending module name is not serving any purpose and just causes unnecessary metadata differences.

Also in this change - when we do apend the module name, replace '.' with '_' when that happens. For example when we build a netmodule and its name is Foo.Bar.dll
More complicated name mangling schemes were discussed, but at this point we will do a simple '.' --> '_' as the least destabilizing change which is still sufficient in the most common case of having dots in the module name.

Fixes dotnet#1430
VSadov added a commit that referenced this pull request Mar 25, 2015
Changed generation of PrivateImplementationDetails to append module name...
@VSadov
VSadov merged commit 94c4887 into dotnet:master Mar 25, 2015
@VSadov
VSadov deleted the PIDname branch August 4, 2015 21:40
JoeRobich added a commit that referenced this pull request Aug 18, 2026
Need to investigate if we can just look for EndsWith('[bot]').

---------

Co-authored-by: Jan Jones <janjones@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C# PrivateImplementationDetails class can contain module name with '.', confusing tools which expect to parse into namespaces

4 participants