Skip to content

Create Microsoft.NetCore.App.Ref targeting pack for NetCoreAppCurrent in libraries #37600

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

Merged
merged 9 commits into from
Jun 9, 2020

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jun 8, 2020

Binplace reference assemblies into a Microsoft.NetCore.App.Ref folder
and also copy data files like the RuntimeList.xml and the
PlatformManifest.txt there.

Rename the runtime pack to microsoft.netcore.app.runtime.$(RID) and always build it.

Fixing a restore issue in the wasm builder (restore and build should
not happen in the same msbuild invocation).

The ref pack will be consumed in #35606.

cc @ericstj

Binplace reference assemblies into a Microsoft.NetCore.App.Ref folder
and also copy data files like the RuntimeList.xml and the
PlatformManifest.txt there.

Rename the runtime pack to microsoft.netcore.app.runtime.$(RID)

Fixing a restore issue in the wasm builder (restore and build should
not happen in the same msbuild invocation).
@ghost
Copy link

ghost commented Jun 8, 2020

Tagging subscribers to this area: @ViktorHofer
Notify danmosemsft if you want to be subscribed.

@ViktorHofer ViktorHofer changed the title Create Microsoft.NetCore.App.Ref Create Microsoft.NetCore.App.Ref targeting pack for NetCoreAppCurrent in libraries Jun 8, 2020
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

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

one question, LGTM otherwise

<MicrosoftNetCoreAppRefPackRefDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'ref'))</MicrosoftNetCoreAppRefPackRefDir>
<MicrosoftNetCoreAppRefPackDataDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'data'))</MicrosoftNetCoreAppRefPackDataDir>

<MicrosoftNetCoreAppRuntimePackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.$(PackageRID)', '$(Configuration)'))</MicrosoftNetCoreAppRuntimePackDir>
Copy link
Member

Choose a reason for hiding this comment

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

could we lift this to some global .props, so we don't need to duplicate it in the iOS/Android/WASM sample .csprojs?

Copy link
Member Author

Choose a reason for hiding this comment

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

@steveisok mentioned that eventually the sample projects will be moved into libraries IIRC

@safern
Copy link
Member

safern commented Jun 8, 2020

FYI: @joperezr as this might help you for the linker tests effort.

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.

Cool!

<MicrosoftNetCoreAppRefPackDataDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'data'))</MicrosoftNetCoreAppRefPackDataDir>

<MicrosoftNetCoreAppRuntimePackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.$(PackageRID)', '$(Configuration)'))</MicrosoftNetCoreAppRuntimePackDir>
<MicrosoftNetCoreAppRuntimePackRidDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackDir)', 'runtimes', '$(PackageRID)'))</MicrosoftNetCoreAppRuntimePackRidDir>
Copy link
Member

Choose a reason for hiding this comment

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

NIT: Do we really need to rename all these variables? Seems like the only runtime pack we are producing is for netcoreapp anyways and we are only really using it in very few places so not sure if we are gaining much by making the property names longer. (Of course I specifically ask this because my linker test functionality depends on the property :+1 but I'm happy to change it if the decision is to rename)

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 prefer an unambiguous meaning as we might introduce a second runtime pack in the future for assets outside of microsoft.netcore.app when we decide to clean the current runtime pack up to only include assets that are part of the shared framework to actually test what we are shipping.

@safern
Copy link
Member

safern commented Jun 9, 2020

@ViktorHofer I tried to run iOS and Android tests on this branch to make sure we don't regress them and they both failed to generate the app bundles.

iOS

/Users/santifdezm/repos/runtime/artifacts/bin/System.Buffers.Tests/net5.0-Debug/ios-x64/AppBundle/modules.m:1:10: fatal error: 'mono/jit/jit.h' file not found
  #include <mono/jit/jit.h>

It seems like we're missing the include assets in the runtime pack.

Android

/Users/santifdezm/repos/runtime/eng/testing/tests.mobile.targets(36,5): error MSB4018: The "AndroidAppBuilderTask" task failed unexpectedly. [/Users/santifdezm/repos/runtime/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj]
/Users/santifdezm/repos/runtime/eng/testing/tests.mobile.targets(36,5): error MSB4018: System.ArgumentException: libmonosgen-2.0.a was not found in /Users/santifdezm/repos/runtime/artifacts/bin/System.Buffers.Tests/net5.0-Debug/android-x86/publish/ [/Users/santifdezm/repos/runtime/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj]

libmonosgen-2.0 is not in the runtime pack so it is missing on the publish dir.

Marking as no merge in the meantime.

@safern safern added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jun 9, 2020
@ViktorHofer ViktorHofer removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jun 9, 2020
@ViktorHofer
Copy link
Member Author

libmonosgen-2.0 is not in the runtime pack so it is missing on the publish dir.

Thanks a lot Santi. Fixed this with 23dfc4e and tested it with Android by following these instructions: https://github.com/dotnet/runtime/blob/master/docs/workflow/testing/libraries/testing-android.md.

@ViktorHofer
Copy link
Member Author

Failure is #37635

@ViktorHofer ViktorHofer merged commit 2b7852b into dotnet:master Jun 9, 2020
@ViktorHofer ViktorHofer deleted the TaretingPackRef branch June 9, 2020 10:10
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

6 participants