-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Re-enable trimming of library tests on Apple mobile #104097
Re-enable trimming of library tests on Apple mobile #104097
Conversation
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -12,6 +12,8 @@ | |||
<!-- Forced by ILLink targets --> | |||
<SelfContained>true</SelfContained> | |||
<PublishDir>$(OriginalPublishDir)</PublishDir> | |||
<!-- Prevent getting DynamicCodeSupport=true default from ILLink targets that are imported with the Sdk.targets --> | |||
<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.
Nice catch! These are difficult to detect when something goes wrong at 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 was under the impression we'd only do AOT on helix, not actual trimming. @steveisok how does this work?
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.
The new default for the property should affect many more cases than just AOT on helix so this doesn't sounds like the correct place for this fix.
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 was under the impression we'd only do AOT on helix, not actual trimming. @steveisok how does this work?
If you want trimming + AOT on helix, both have to occur in the same place. Otherwise, you have to send individual copies of the trimmed shared framework for each test from the build machine.
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.
That might not be as painful as it seemed initially.
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.
@akoeplinger Since we perform trimming on Helix, we can move this to the Directory.Build.props
file. However, it will not have effect on other components.
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've added a default switch to disable trimming on build machines as well. I haven't found a common location where these switches are set in Mono. Since we don't ship Apple mobile support from the runtime repository, the switch is set in the SDK/Xamarin.
A potential place to set this switch could be the AOT compiler props, but they are invoked after the trimming.
/cc: @sbomer
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.
The ideal solution would be for the AOT compiler props in this repo to be imported before the trimming props, which is how this works in the SDK. But barring that the Directory.Build.props seems like a good place.
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.
The ILLink feature switches are moved to ConfigureTrimming
target.
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Hm yeah, I see your point.
To tackle this, it would be great if we would have an ability to rerun the same state with trimming disabled, to rule out that as an issue. With something like This is just an idea, probably out-of-scope, just thinking of ways of how to improve the triaging experience. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
The failures shouldn't be related. |
<PropertyGroup Condition="'$(TargetsAppleMobile)' == 'true' and '$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true'"> | ||
<_DefaultValueAttributeSupport>true</_DefaultValueAttributeSupport> | ||
<_DesignerHostSupport>true</_DesignerHostSupport> | ||
</PropertyGroup> |
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.
nit: move this into tests.mobile.targets enabled by a new property, e.g. OverrideDefaultValueAndDesignerHostSupport
, so you don't need to duplicate it across the three projects
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g All failures are known. |
* Re-enable trimming of library tests on Apple mobile
Description
This PR re-enables the trimming of library tests on Apple mobile platforms. This change prevents the default settings of ILLink switches from targets that are imported. The regression was introduced in #103594.
Fixes #91923