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

[master] Add DecoratedNameAttribute needed by C++/CLI compiler #40125

Merged
merged 1 commit into from Aug 19, 2019

Conversation

@jkoritzinsky
Copy link
Member

commented Aug 7, 2019

The System.Runtime.CompilerServices.DecoratedNameAttribute type is needed by WPF. This type used to exist in .NET Framework; this is just porting the attribute as-is to .NET Core. This type is used by the C++/CLI compiler. Without it, WPF has been seeing "invalid typeref" warnings at crossgen time.

I've confirmed with the C++/CLI team that this change allows them to correctly find the type on their end.

See dotnet/wpf#634

See #40127 for the corresponding change in release/3.0.

@vatsan-madhavan

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

@vatsan-madhavan

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

/cc @rladuca

@ericstj

ericstj approved these changes Aug 7, 2019

@vatsan-madhavan

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Does this need a type-forward from System.Runtime and mscorlib ?

This was the error noted in the orginal report:

Warning: Could not load type 'System.Runtime.CompilerServices.DecoratedNameAttribute' from assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. while resolving 0x1000044 - System.Runtime.CompilerServices.DecoratedNameAttribute.

@ericstj

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

It will have the typeforward from mscorlib automatically via the shim project. Does the C++/CLI assume it's coming from System.Runtime, or will it write the typeref to S.R.CS.VisualC once the type shows up there in the reference assembly?

System.Runtime cannot type-forward to VisualC, that'd be a cycle, if C++/CLI requires the type to be in System.Runtime that's where we'd have to put it.

@vatsan-madhavan

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Does the linker assume it's coming from System.Runtime, or will it write the typeref to S.R.CS.VisualC once the type shows up there in the reference assembly

We need input from @tgani-msft here. I'll reach out by email as well.

@eiriktsarpalis eiriktsarpalis added this to the 5.0 milestone Aug 8, 2019

@tgani-msft

This comment has been minimized.

Copy link

commented Aug 8, 2019

It will have the typeforward from mscorlib automatically via the shim project. Does the C++/CLI assume it's coming from System.Runtime, or will it write the typeref to S.R.CS.VisualC once the type shows up there in the reference assembly?

System.Runtime cannot type-forward to VisualC, that'd be a cycle, if C++/CLI requires the type to be in System.Runtime that's where we'd have to put it.

We put out a typeref for it in S.R.CS.VisualC as it's specific to C++. However, the type itself isn't in a "VisualC" namespace so there's a bit of mismatch there (but there are other types with this pattern as well in the same assembly).

@ericstj

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

We put out a typeref for it in S.R.CS.VisualC as it's specific to C++

Does that require a new compiler to get that change? Original error has typeref to System.Runtime. If it requires a new compiler, is WPF on track to get that compiler in time?

@tgani-msft

This comment has been minimized.

Copy link

commented Aug 8, 2019

We put out a typeref for it in S.R.CS.VisualC as it's specific to C++

Does that require a new compiler to get that change? Original error has typeref to System.Runtime. If it requires a new compiler, is WPF on track to get that compiler in time?

Yes, WPF will have to pick up a new compiler. I'm in the process of PR-ing the compiler changes and will work with WPF to have them update their tools. The new compiler also has the [SuppressMergeCheck] errors fixed.

@jkoritzinsky jkoritzinsky merged commit 86db0ef into dotnet:master Aug 19, 2019

15 checks passed

WIP Ready for review
Details
corefx-ci Build #20190807.53 succeeded
Details
corefx-ci (Linux RedHat6_x64_Release) Linux RedHat6_x64_Release succeeded
Details
corefx-ci (Linux arm64_Debug) Linux arm64_Debug succeeded
Details
corefx-ci (Linux arm_Debug) Linux arm_Debug succeeded
Details
corefx-ci (Linux musl_arm64_Debug) Linux musl_arm64_Debug succeeded
Details
corefx-ci (Linux musl_x64_Debug) Linux musl_x64_Debug succeeded
Details
corefx-ci (Linux x64_Debug) Linux x64_Debug succeeded
Details
corefx-ci (MacOS x64_Debug) MacOS x64_Debug succeeded
Details
corefx-ci (Packaging All Configurations x64_Debug) Packaging All Configurations x64_Debug succeeded
Details
corefx-ci (Windows NETFX_x86_Release) Windows NETFX_x86_Release succeeded
Details
corefx-ci (Windows UWP_CoreCLR_x64_Debug) Windows UWP_CoreCLR_x64_Debug succeeded
Details
corefx-ci (Windows x64_Debug) Windows x64_Debug succeeded
Details
corefx-ci (Windows x86_Release) Windows x86_Release succeeded
Details
license/cla All CLA requirements met.
Details

@jkoritzinsky jkoritzinsky deleted the jkoritzinsky:DecoratedNameAttribute branch Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.