-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[libraries] Build lib-runtime-packs for all of mono, not just mobile #35295
Changes from 9 commits
69d7d13
cc4a3e1
7bb8bca
560d208
8cecd66
08b9b41
8b1b854
93080b5
a1897df
d5464fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -24,6 +24,10 @@ | |||||||||
<BinPlaceItem Condition="'$(BinPlaceTestRuntimePack)' != 'true'" Include="@(NativeBinPlaceItem)" /> | ||||||||||
<FileWrites Include="@(NativeBinPlaceItem)" /> | ||||||||||
</ItemGroup> | ||||||||||
<ItemGroup Condition="'$(BinPlaceTestRuntimePack)' == 'true' and '$(TargetsMobile)' != 'true'"> | ||||||||||
<TestHostBinPlaceItem Include="%(NativeBinPlaceItem.Identity)" /> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? I think we can achieve the same by updating the condition to include into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For my understanding ;-) Can you give an example of what you think will work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of adding this new item I think you can just update the above Item to:
Suggested change
BinPlaceItem should always contribute to the testhost directory. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the code to
The two testhost, before and after, are identical. However lib-runtime-packs seem to differ, where the one with this change has more files.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can run it again, but is this desired? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @steveisok we want the Xamarin Desktop runtime packs to have the native assets produced from libraries, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually that's wrong. Because it is going under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I answered previously assuming your question. The desktop structure for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. My suggestion here unfortunately doesn't work 😄. Whenever we start producing self contained assets I guess we can revisit and see if there is a better way. |
||||||||||
<FileWrites Include="@(TestHostBinPlaceItem)" /> | ||||||||||
</ItemGroup> | ||||||||||
</Target> | ||||||||||
|
||||||||||
<Target Name="Build" DependsOnTargets="BinPlace" /> | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(BinPlaceTestRuntimePack)' != 'true'"> | ||
<ItemGroup Condition="'$(TargetsMobile)' != 'true'"> | ||
<PackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(MicrosoftNETCoreDotNetHostVersion)" /> | ||
<PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="$(MicrosoftNETCoreDotNetHostPolicyVersion)" /> | ||
<!-- We do not need apphost.exe and the 3.0 SDK will actually remove it. | ||
|
@@ -40,6 +40,7 @@ | |
<!-- Setup the testing shared framework host --> | ||
<Target Name="SetupTestingHost" | ||
Condition="'$(BinPlaceTestSharedFramework)' == 'true'" | ||
DependsOnTargets="OverrideRuntimeMono" | ||
AfterTargets="AfterResolveReferences"> | ||
<PropertyGroup> | ||
<HostFxrFileName Condition="'$(TargetsWindows)' == 'true'">hostfxr</HostFxrFileName> | ||
|
@@ -50,7 +51,12 @@ | |
<UseHardlink Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">false</UseHardlink> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ItemGroup Condition="'$(RuntimeFlavor)' == 'Mono'"> | ||
<HostFxFile Include="@(StoreTestHostFiles)" Condition="'%(StoreTestHostFiles.Filename)' == '$(HostFxrFileName)'" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this going to include There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I commented incorrectly the last time, so trying again ;-). We won't be including There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Last time that I ran the builds for mobile/mono both When using your suggested changes, the same functionality was achieved. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right. I somehow got confused by the fact that we were copying them over to the test host 😄 |
||
<DotnetExe Include="@(StoreTestHostFiles)" Condition="'%(StoreTestHostFiles.Filename)' == 'dotnet'" /> | ||
mdh1418 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(RuntimeFlavor)' != 'Mono'"> | ||
<HostFxFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == '$(HostFxrFileName)'" /> | ||
<DotnetExe Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'dotnet'" /> | ||
</ItemGroup> | ||
|
@@ -69,7 +75,7 @@ | |
</Target> | ||
|
||
<Target Name="SetupRuntimePackNative" | ||
Condition="'$(BinPlaceTestRuntimePack)' == 'true' and '$(RuntimeFlavor)' == 'Mono'" | ||
Condition="'$(RuntimeFlavor)' == 'Mono'" | ||
AfterTargets="AfterResolveReferences"> | ||
<ItemGroup> | ||
<NativeBinPlaceItem Include="@(RuntimeFiles)" /> | ||
|
@@ -80,6 +86,9 @@ | |
<DestinationSubDirectory>include/%(RecursiveDir)</DestinationSubDirectory> | ||
</NativeBinPlaceItem> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true'"> | ||
mdh1418 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<TestHostBinPlaceItem Include="@(RuntimeFiles)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="OverrideRuntimeCoreCLR" | ||
|
@@ -98,8 +107,9 @@ | |
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" | ||
AfterTargets="AfterResolveReferences;FilterNugetPackages" | ||
Condition="'$(RuntimeFlavor)' == 'Mono'"> | ||
<ItemGroup Condition="'$(BinPlaceTestRuntimePack)' != 'true'"> | ||
<ReferenceCopyLocalPaths Include="@(RuntimeFiles)" /> | ||
<ItemGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once you do what I suggested here: https://github.com/dotnet/runtime/pull/35295/files#r416829953 You can remove this
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I might have just broken the tests with this suggestion 😄. Because you're adding Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay will change this now. I was wondering if it was breaking because I forgot the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the mono tests are crashing because it can’t find some runtime files and your first commit was green. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something still isn't right. libcoreclr is ending up in lib. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually.... I ran the builds before the adjustments, and checked the previous There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the whole |
||
<StoreTestHostFiles Include="@(ReferenceCopyLocalPaths)" /> | ||
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
|
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.
@mdh1418 @steveisok I guess this is a workaround until we get the self contained test runs story for Xamarin tests, right?
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.
Yes. It will go away
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.
Awesome.