Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Generate framework manifest file#38792

Merged
ViktorHofer merged 5 commits intodotnet:masterfrom
ViktorHofer:ManifestFile
Jul 1, 2019
Merged

Generate framework manifest file#38792
ViktorHofer merged 5 commits intodotnet:masterfrom
ViktorHofer:ManifestFile

Conversation

@ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jun 23, 2019

Requires #36207

The property that points to the manifest which is passed down to the _HandlePackageFileConflicts task is set in CoreFxTesting. The only work necessary here is to generate the manifest file.

@ViktorHofer
Copy link
Member Author

Also tested locally with netfx and uap. On netfx it seems to not matter at all, on uap the conflict resolution brings in wrong items but we overwrite those when we run the test by copying the uap runtime assemblies to the output directory.

@ViktorHofer ViktorHofer changed the title Generate framework manifest file Generate framework manifest file and disable runtime binplacing Jun 23, 2019
@ericstj
Copy link
Member

ericstj commented Jun 24, 2019

You need to deal with this hack

<RefPath>$(ArtifactsBinDir)runtime/$(TargetGroup)-$(_runtimeOSGroup)-$(_bc_ConfigurationGroup)-$(ArchGroup)/</RefPath>
. Also make sure that however you do it, it works well for AllConfigurations build. These manual shims are building against implementation and need to be able to see all implementation assemblies for the current TargetGroup (see https://github.com/dotnet/corefx/issues/36715). 😿

You can probably just persist the hack for the short term to use your test sharedc fx folders, but you can't do that once you start removing things from the test shared fx, since these shims need to forward to assemblies which aren't necessarily inbox.

@ViktorHofer
Copy link
Member Author

CoreFxTesting doesn't care about which vertical is currently built and instead uses TargetFrameworkIdentifier. It sounds like the manual shims also only care about the current TargetGroup and not about the vertical. Could that work? a28f360

@ericstj
Copy link
Member

ericstj commented Jun 24, 2019

Could that work?

I haven't looked at all the places that use $(RuntimePath) but I can imagine that the problems with constraining it to target group (vs what it was before) are that it won't have the right value for projects that target netstandard*.

@ViktorHofer ViktorHofer force-pushed the ManifestFile branch 2 times, most recently from 6465cb3 to c8e162f Compare June 25, 2019 08:13
@ViktorHofer
Copy link
Member Author

I can imagine that the problems with constraining it to target group (vs what it was before) are that it won't have the right value for projects that target netstandard*.

We currently only use that property for test projects (referenceFormRuntime, Directory.Build.targets and inside ApiCompat.proj). None of those should cause problems.

I linked to my private package in my feed to get CI coverage to be sure nothing regresses.

@ViktorHofer ViktorHofer changed the title Generate framework manifest file and disable runtime binplacing Generate framework manifest file Jun 25, 2019
@ViktorHofer
Copy link
Member Author

I decided to keep the runtime binplacing as I don't see an easy way around solving the manual shims dependency on it. If you have any idea how to solve this, I'm open for suggestions (not part of this PR). What if we don't use the aggregated binplaced folder but instead reference the assembly's output directories with a glob pattern?

@ViktorHofer ViktorHofer force-pushed the ManifestFile branch 3 times, most recently from 38c3f99 to 442a75b Compare June 27, 2019 20:00
@ViktorHofer ViktorHofer force-pushed the ManifestFile branch 3 times, most recently from 918417a to d039faa Compare June 29, 2019 18:22
@ViktorHofer ViktorHofer reopened this Jun 29, 2019
@ViktorHofer
Copy link
Member Author

ViktorHofer commented Jun 30, 2019

@ericstj this is ready to be merged but I had to workaround a few issues:

@ViktorHofer
Copy link
Member Author

Spoke with @ericstj offline. I'm going to merge this meanwhile and will react to his feedback when he has time to review the additional changes.

@ViktorHofer ViktorHofer merged commit c224a24 into dotnet:master Jul 1, 2019
@ViktorHofer ViktorHofer deleted the ManifestFile branch July 1, 2019 17:48
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few small comments for follow up?

BeforeTargets="_HandlePackageFileConflicts"
Condition="'$(IsTestProject)' == 'true' and '@(DefaultReferenceExclusions)' != ''">
<ItemGroup>
<Reference Include="@(DefaultReferenceExclusions->'$(RefPath)%(Identity).dll')" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this for? It seems like you're trying to coflict resolve against exclusions, but then you just remove them regradless. Why not instead just remove any exclusions after?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good suggestion. Remove the reference after the conflict resolution is done. For that I need to touch arcade, let me do that in a subsequent PR, whenever I touch CoreFxTesting again.

<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you could get rid of the OS-specific targeting too? I didn't see anywhere this different between Windows and Unix.

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'll check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marek-safar noticed this today. I think we can remove it.

Condition="'$(PlatformManifestFile)' != ''"
BeforeTargets="GenerateFileVersionProps">
<ItemGroup Condition="'$(BuildingNETCoreAppVertical)' == 'true'">
<_manualSharedFrameworkRuntimeFiles Include="System.Security.Cryptography.Native.OpenSsl.so" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just do a glob of the native folder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I'm not sure how I would get the file-extensions (so and dylib) and 2) System.Security.Cryptography.Native.OpenSsl isn't a file/dir name anywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact file names will be under $(NativeBinDir). If they aren't, then I don't imagine you'd care about feeding them to conflict resolution.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to follow-up on this. System.Security.Cryptography.Native.OpenSsl isn't under $(NativeBinDir) but we care about feeding it to conflict resolution as otherwise it would restore runtime assets for it into the test app's output dir.

@karelz karelz added this to the 3.0 milestone Jul 16, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Generate framework manifest file

* Manual darc update from build '20190629.2'

* Handle DefaultReferenceExclusions

* Add runtime assets filter

* Generate manifest file for all verticals


Commit migrated from dotnet/corefx@c224a24
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