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

Adds support for generating Mono named NETCore.App Runtime Packs #34980

Merged
merged 16 commits into from
Apr 17, 2020

Conversation

steveisok
Copy link
Member

In the platforms where there will be both Mono and CoreCLR, we should provide uniquely named runtime packs for easier identification. This is currently scoped to desktop mono, but could be applied to other scenarios as needed.

Refer to #34193 for the discussion that drove this PR.

In the platforms where there will be both Mono and CoreCLR, we should
provide uniquely named runtime packs for easier identification.

dotnet#34193 contains the discussion
that drove this PR.
@safern
Copy link
Member

safern commented Apr 15, 2020

Do we want to start generating mono desktop runtime packs already? Or is this just a step towards that?

@steveisok
Copy link
Member Author

Do we want to start generating mono desktop runtime packs already? Or is this just a step towards that?

Yes, I think so. This will be to support Xamarin.Mac. Also, the benchmark team was relying on runtime nuget packages in order to get mono into their runs. Since they were recently disabled, I'm intending for the runtime pack to be a substitute.

@steveisok
Copy link
Member Author

Removing linux & windows installers. Will file separate issues.

Linux (base-job needs modified)

##[error]Unhandled: Not found SourceFolder: /datadisks/disk1/workspace/_work/1/s/artifacts/obj/linux-x64.Release/sharedFrameworkPublish

Win (mono needs to write file version & other attributes to coreclr.dll)

.nuget\packages\microsoft.dotnet.build.tasks.sharedframework.sdk\5.0.0-beta.20201.2\targets\framework.dependency.targets(201,5): Missing FileVersion in 1 shared framework files:

@steveisok
Copy link
Member Author

@dagood
Copy link
Member

dagood commented Apr 17, 2020

I don't know what's expected since I haven't been keeping up with the infra, but this look strange:

In Installer Build and Test coreclr OSX_x64 Release, runtime.osx-x64.runtime.native.System.IO.Ports.5.0.0-preview.4.20216.15.nupkg is uploaded to the artifacts:

Copying /Users/runner/runners/2.166.2/work/1/s/artifacts/packages/Release/Shipping/runtime.osx-x64.runtime.native.System.IO.Ports.5.0.0-preview.4.20216.15.nupkg to /Users/runner/runners/2.166.2/work/1/a/UnsignedArtifacts/OSX_x64/Shipping/runtime.osx-x64.runtime.native.System.IO.Ports.5.0.0-preview.4.20216.15.nupkg

https://dev.azure.com/dnceng/internal/_build/results?buildId=604886&view=logs&j=b729f9b8-8cfd-5258-0750-b059b4fd2770&t=1d60dfb5-561e-5f67-3db2-39f0e5ea44ff&l=55

The same nupkg (well, filename) is uploaded during Installer Build and Test mono OSX_x64 Release:

Copying /Users/runner/runners/2.166.2/work/1/s/artifacts/packages/Release/Shipping/runtime.osx-x64.runtime.native.System.IO.Ports.5.0.0-preview.4.20216.15.nupkg to /Users/runner/runners/2.166.2/work/1/a/UnsignedArtifacts/OSX_x64/Shipping/runtime.osx-x64.runtime.native.System.IO.Ports.5.0.0-preview.4.20216.15.nupkg

https://dev.azure.com/dnceng/internal/_build/results?buildId=604886&view=logs&j=04abcb85-da1e-56d8-8bdb-e7a8fd8e385f&t=85712f9a-2311-57a9-bee8-a904ee29ec2f&l=13

That makes it a race, but don't know if the contents are different. This may be present in more of the build legs, don't know if this is really a problem with this PR.

It's weird to me that this Libraries native package is being uploaded at this point in the build, at all.

@steveisok
Copy link
Member Author

I saw that too and thought about trying to remove it. Should it hold this PR up though?

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

Setup changes look reasonable to me. Up to infra team if the race issue needs more attention in this specific PR.

@steveisok steveisok requested a review from a team April 17, 2020 15:11
@safern
Copy link
Member

safern commented Apr 17, 2020

Good catch @dagood. So the package contents should be the same as for this new leg the libraries assets are build against coreclr since I don’t see @steveisok adding a configuration for OSX with mono configuration in libraries.

However I think we should do that and probably skip package generation in libraries when RuntimeFlavor == mono. cc @ericstj thoughts?

<RuntimeFlavor Condition="'$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'WebAssembly'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>

Copy link
Member

Choose a reason for hiding this comment

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

nit: Please close this PropertyGroup and open a new one.

Copy link
Member Author

Choose a reason for hiding this comment

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

can that happen in a follow up PR?

</PropertyGroup>

<!-- Init _subSet here in to allow RuntimeFlavor to be set as early as possible -->
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<!-- Init _subSet here in to allow RuntimeFlavor to be set as early as possible -->
<!-- Init _subset here in to allow RuntimeFlavor to be set as early as possible -->

Copy link
Member Author

Choose a reason for hiding this comment

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

Same - can that happen in a follow up PR?

Copy link
Member

Choose a reason for hiding this comment

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

of course, those were just nits.


<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'WebAssembly'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime')))">Mono</RuntimeFlavor>
Copy link
Member

Choose a reason for hiding this comment

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

Lost some + in the move, it looks like, if I understand the pattern right:

Suggested change
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>

I would put it on multiple lines for easier reading/review, but this is subjective and I'm sure some people are annoyed at me doing it all the time 😄:

    <RuntimeFlavor
      Condition="
        '$(RuntimeFlavor)' == '' and
        (
          $(_subset.Contains('+mono+')) or
          $(_subset.Contains('+mono.runtime'))
        ) and
        (
          !$(_subset.Contains('+clr+')) and
          !$(_subset.Contains('+clr.runtime'))
        )">Mono</RuntimeFlavor>

Copy link
Member

Choose a reason for hiding this comment

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

@steveisok I edited my message on Teams and added the missing pluses :D You probably took mine before the edit :D

Copy link
Member

@dagood dagood Apr 17, 2020

Choose a reason for hiding this comment

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

FWIW, seems like this is a nit as well to me--I think it would only cause a problem if we added a clr.runtimefoobar subset (and... some probably complicated scenario about what the subset's meant to do).

@steveisok steveisok merged commit 73a10cc into dotnet:master Apr 17, 2020
steveisok pushed a commit to steveisok/runtime that referenced this pull request Apr 17, 2020
ViktorHofer pushed a commit that referenced this pull request Apr 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 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