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

Move DynamicCodeSupport default into aot targets #87135

Merged
merged 2 commits into from
Jun 8, 2023
Merged

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Jun 5, 2023

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

@ghost
Copy link

ghost commented Jun 5, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

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

Author: sbomer
Assignees: sbomer
Labels:

area-NativeAOT-coreclr

Milestone: -

@@ -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>
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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.

@sbomer sbomer merged commit 3502f0e into main Jun 8, 2023
@MichalStrehovsky MichalStrehovsky deleted the dynamicCodeSupport branch June 9, 2023 01:46
sbomer added a commit to dotnet/sdk that referenced this pull request Jun 9, 2023
This setting was moved into the AOT targets in dotnet/runtime#87135.
@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants