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

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

Merged
merged 2 commits into from
Mar 25, 2015

Conversation

VSadov
Copy link
Member

@VSadov VSadov commented Mar 24, 2015

... 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
Copy link
Member Author

VSadov commented Mar 24, 2015

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

/// Given an input string changes it to be acceptable as a part of a type name.
/// For now we will simply replace '.' with '_'as the most common case.
/// </summary>
internal static string MangleForTypeNameIfNeeded(this string original)
Copy link
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
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
Copy link
Member

gafter commented Mar 24, 2015

👍 though please note my comment


if (submissionSlotIndex >= 0)
{
name += submissionSlotIndex.ToString();
Copy link
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
Copy link
Member

agocke commented Mar 25, 2015

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

@VSadov
Copy link
Member Author

VSadov commented Mar 25, 2015

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants