Skip to content

Conversation

@steveisok
Copy link
Member

First pass at a more comprehensive mono workload that includes wasm, the aot compilers, and the runtime config task.

Steve Pfister added 5 commits April 7, 2021 17:48
We were originally publishing the MonoAOTCompiler nuget and having Blazor, iOS, and Android include it as part of their workload.  Unfortunately, the workload spec does not allow multiple pack references from different manifests.  To get around this 1-1 relationship, we can supply a containing workload that can be consumed via the extends key.

Resolves dotnet/sdk#16700
@steveisok steveisok requested a review from marek-safar as a code owner April 15, 2021 19:25
@ghost ghost added the area-Build-mono label Apr 15, 2021
@steveisok steveisok requested review from akoeplinger and lewing April 15, 2021 19:26
Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

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

Added some thoughts. More to come

@lewing lewing force-pushed the mono-toolchain-workload branch from b273dbd to 13827a7 Compare April 16, 2021 00:12
@lewing lewing force-pushed the mono-toolchain-workload branch from 13827a7 to d1e0623 Compare April 16, 2021 00:36
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />

<PropertyGroup>
<WorkloadTasksAssemblyPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)'))WorkloadBuildTasks.dll</WorkloadTasksAssemblyPath>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why Debug ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@akoeplinger Do you recall why it's always debug?

Copy link
Member

Choose a reason for hiding this comment

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

We always build all tasks in debug. I believe the reason for that was that one of the subsets modified the configuration property which caused the tasks to not build correctly in mixed configurations. Also hardcoding to one configuration avoids a rebuild when you switch configurations when building the repo.

@SamMonoRT
Copy link
Member

cc @grendello from Android pov

@grendello
Copy link
Contributor

cc @jonathanpeppers, @dellis1972

@mhutch
Copy link
Contributor

mhutch commented Apr 29, 2021

Regarding b40c49b, are you assuming that the installer/resolver will fall back to osx-x64 packs on osx-arm64 hosts?

@mhutch
Copy link
Contributor

mhutch commented Apr 29, 2021

I would recommend marking all these workloads as abstract so they're only able to be installed via the concrete platform SDK workloads that extend them.

@lewing lewing force-pushed the mono-toolchain-workload branch from 587c552 to 2b7d364 Compare April 29, 2021 03:28
@lewing lewing force-pushed the mono-toolchain-workload branch from 2b7d364 to 921f982 Compare April 29, 2021 03:38
@steveisok
Copy link
Member Author

Regarding b40c49b, are you assuming that the installer/resolver will fall back to osx-x64 packs on osx-arm64 hosts?

After a bunch of back and forth, we'll be explicit about what happens on osx-arm64.

Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

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

Looks good enough to start producing packs.

@lewing
Copy link
Member

lewing commented May 3, 2021

Regarding b40c49b, are you assuming that the installer/resolver will fall back to osx-x64 packs on osx-arm64 hosts?

After a bunch of back and forth, we'll be explicit about what happens on osx-arm64.

I tested the aliasing we're using now with an arm64 runtime on an m1 and produced functional AOT builds

@steveisok steveisok merged commit b31bcc3 into dotnet:main May 3, 2021
@ViktorHofer
Copy link
Member

This change broke our official builds:

D:\workspace\_work\1\s\src\installer\prepare-artifacts.proj(126,5): error : Item to sign 'Microsoft.NET.Sdk.Mono.Toolchain.Manifest.6.0.0-preview.5.21253.8.nupkg' was not found in the artifacts
##[error]src\installer\prepare-artifacts.proj(126,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Item to sign 'Microsoft.NET.Sdk.Mono.Toolchain.Manifest.6.0.0-preview.5.21253.8.nupkg' was not found in the artifacts

https://dev.azure.com/dnceng/internal/_build/results?buildId=1119221&view=logs&j=4d50a8bf-a143-51c7-5cc8-defff437e23b&t=0b0b242f-bbcb-57b5-fe9f-26dc042642ec&l=200

@akoeplinger
Copy link
Member

#52247

-->
<NETStandardPatchVersion>0</NETStandardPatchVersion>
<MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>6.0.0-preview.4.21212.1</MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETRuntimeEmscripten2012Nodewinx64Version)</MicrosoftNETRuntimeEmscriptenVersion>
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 please move these two properties down to the other property group and add a comment to indicate which repo these properties are targeting? Similar to all the other properties in this file (see below).

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<OutputType>Library</OutputType>
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can remove this property. It's the default.

Comment on lines +15 to +17
<Target Name="PublishBuilder"
AfterTargets="Build"
DependsOnTargets="Publish" />
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to publish the task?

@@ -0,0 +1,46 @@
<Project>
Copy link
Member

@ViktorHofer ViktorHofer May 4, 2021

Choose a reason for hiding this comment

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

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup>
<PackageDescription>Internal toolchain package not meant for direct consumption. Please do not reference directly.</PackageDescription>
Copy link
Member

Choose a reason for hiding this comment

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

Consider setting <UseRuntimePackageDisclaimer>true</UseRuntimePackageDisclaimer> which adds the standard description for internal packages that we use everywhere else:

<PackageDescription Condition="'$(PackageDescription)' == '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer)</PackageDescription>
.

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />

<PropertyGroup>
<WorkloadTasksAssemblyPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)'))WorkloadBuildTasks.dll</WorkloadTasksAssemblyPath>
Copy link
Member

Choose a reason for hiding this comment

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

Use NormalizePath instead. NormalizeDirectory is intended to be used for paths to directories where-as NormalizePath is for file paths.

<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />
<Import Project="Sdk.props" Sdk="Microsoft.NETcore.App.Runtime.AOT.Cross.browser-wasm" />
</ImportGroup>
Copy link
Member

Choose a reason for hiding this comment

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

nit: indentations in this file are off. We use two spaces in all our msbuild files in the repo.

@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
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.