-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Move DynamicCodeSupport default into aot targets #87135
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsI think this default setting should live alongside the other feature switch defaults in the aot targets. Currently it's defined in the SDK. Once this change flows to SDK I'll remove it there: dotnet/sdk#33040
|
@@ -43,6 +43,7 @@ The .NET Foundation licenses this file to you under the MIT license. | |||
<UseSystemResourceKeys Condition="$(IlcDisableReflection) == 'true'">true</UseSystemResourceKeys> | |||
<EventSourceSupport Condition="$(IlcDisableReflection) == 'true'">false</EventSourceSupport> | |||
<EventSourceSupport Condition="$(EventSourceSupport) == ''">false</EventSourceSupport> | |||
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == ''">false</DynamicCodeSupport> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to test these things in dotnet/runtime
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of any current test infra in runtime to check that MSBuild settings correctly flow into the runtimeconfig or ILC - and I doubt folks would want to add SDK-style project tests to runtime.
At least the SDK test you added will check this once the change flows into SDK:
https://github.com/dotnet/sdk/blob/aeec71c8cb155a57e2e57f6507dd58ec9e4f3224/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs#L825
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We compile all NativeAOT tests in dotnet/runtime using this target so we could check for this in NativeAOT (look for the appcontext switch at runtime). But it won't cover CoreCLR so we could still have a bug that this is only set in Publish and not know about it. Not sure it's worth the trouble just for that.
This setting was moved into the AOT targets in dotnet/runtime#87135.
I think this default setting should live alongside the other feature switch defaults in the aot targets. Currently it's defined in the SDK. Once this change flows to SDK I'll remove it there: dotnet/sdk#33040