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

TrimOOBAssemblies target shouldn't hardcode untrimmable assemblies #72166

Closed
ViktorHofer opened this issue Jul 14, 2022 · 1 comment · Fixed by #72171
Closed

TrimOOBAssemblies target shouldn't hardcode untrimmable assemblies #72166

ViktorHofer opened this issue Jul 14, 2022 · 1 comment · Fixed by #72171

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Jul 14, 2022

The TrimOOBAssemblies's dependent target currently hardcodes the list of untrimmable out-of-band assemblies:

<!-- The following is the list of all the OOBs we will ignore for now -->
<OOBAssemblyToIgnore Include="System.CodeDom;
System.ComponentModel.Composition;
System.ComponentModel.Composition.Registration;
System.Composition.AttributedModel;
System.Composition.Convention;
System.Composition.Hosting;
System.Composition.Runtime;
System.Composition.TypedParts;
System.Configuration.ConfigurationManager;
System.Speech;
Microsoft.Extensions.DependencyInjection.Specification.Tests" />

This information is already provided by the projects themselves and should just be accessed by flowing it through the TargetPathWithTargetPlatformMoniker item. That static data isn't up-to-date already as System.ComponentModel.AttributedModel and System.Composition.Runtime are trimmable but were excluded from the validation.

Noticed this in https://github.com/dotnet/runtime/pull/71752/files#diff-c45d29e8d7bee20b15b64ce806983857a3e5899cbedc412e71cce4bd83a70323R58 which sets <IsTrimmable>false</IsTrimmable> in the project's body but also in the oob.proj file.

cc @eerhardt @joperezr @ericstj

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 14, 2022
@ghost
Copy link

ghost commented Jul 14, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

The TrimOOBAssemblies's dependent target currently hardcodes the list of untrimmable out-of-band assemblies:

<!-- The following is the list of all the OOBs we will ignore for now -->
<OOBAssemblyToIgnore Include="System.CodeDom;
System.ComponentModel.Composition;
System.ComponentModel.Composition.Registration;
System.Composition.AttributedModel;
System.Composition.Convention;
System.Composition.Hosting;
System.Composition.Runtime;
System.Composition.TypedParts;
System.Configuration.ConfigurationManager;
System.Speech;
Microsoft.Extensions.DependencyInjection.Specification.Tests" />

This information is already provided by the projects themselves and should just be accessed by flowing it through the TargetPathWithTargetPlatformMoniker item (similar to

<ItemDefinitionGroup>
<TargetPathWithTargetPlatformMoniker>
<IsReferenceAssemblyProject>$(IsReferenceAssemblyProject)</IsReferenceAssemblyProject>
</TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup>
) so that the targets has access to the data.

cc @eerhardt @joperezr @ericstj

Author: ViktorHofer
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

ViktorHofer added a commit that referenced this issue Jul 14, 2022
Fixes #72166

Use the `TargetPathWithTargetPlatformMoniker` to flow through the IsTrimmable property that is set by projects and use that for illink validation assembly selection.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 14, 2022
ViktorHofer added a commit that referenced this issue Jul 14, 2022
* Remove hardcoded non trimmable assemblies in oob.proj

Fixes #72166

Use the `TargetPathWithTargetPlatformMoniker` to flow through the IsTrimmable property that is set by projects and use that for illink validation assembly selection.

* Update oob.proj

* Update illink.targets
@ghost ghost removed untriaged New issue has not been triaged by the area owner in-pr There is an active PR which will close this issue when it is merged labels Jul 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant