Generate framework manifest file#38792
Conversation
|
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. |
|
You need to deal with this hack . 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. |
|
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 |
I haven't looked at all the places that use |
6465cb3 to
c8e162f
Compare
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. |
b622fa4 to
9ba9d9d
Compare
|
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? |
38c3f99 to
442a75b
Compare
918417a to
d039faa
Compare
d87cdb4 to
b50292a
Compare
b50292a to
670a39a
Compare
|
@ericstj this is ready to be merged but I had to workaround a few issues:
|
|
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. |
ericstj
left a comment
There was a problem hiding this comment.
LGTM, just a few small comments for follow up?
| BeforeTargets="_HandlePackageFileConflicts" | ||
| Condition="'$(IsTestProject)' == 'true' and '@(DefaultReferenceExclusions)' != ''"> | ||
| <ItemGroup> | ||
| <Reference Include="@(DefaultReferenceExclusions->'$(RefPath)%(Identity).dll')" /> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
I wonder if you could get rid of the OS-specific targeting too? I didn't see anywhere this different between Windows and Unix.
There was a problem hiding this comment.
@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" /> |
There was a problem hiding this comment.
Can you just do a glob of the native folder?
There was a problem hiding this comment.
- I'm not sure how I would get the file-extensions (so and dylib) and 2)
System.Security.Cryptography.Native.OpenSslisn't a file/dir name anywhere.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
* 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
Requires #36207
The property that points to the manifest which is passed down to the
_HandlePackageFileConflictstask is set in CoreFxTesting. The only work necessary here is to generate the manifest file.