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

[build] Use arcade dependency management tooling #5731

Merged
merged 6 commits into from Mar 22, 2021
Merged

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Mar 11, 2021

Context: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md

The dotnet core engineering group has some dependency management tooling
(known as darc) that we'd like to adopt. Integrating this tooling in
to the build system will make it easier to stay up to date with the
latest .NET 6 SDK changes.

Many dotnet repos use a publishing workflow that will push build
artifact data to a central location known as the "Build Asset Registry".
This data includes a "Channel" association, which is the key to
dependency updating. Local updates and automatic update "Subscriptions"
compare the version files in a given repo against the product versions
avalable in the channel that you are interested in.

We hope to be able to publish Xamarin SDK build information to this
central registry in the near future, so that other products can take a
dependency on us as needed (MAUI for instance).

The darc tool looks for four different files in a repo when adding a
dependency or when checking for an update:

  • eng/Version.Details.xml
  • eng/Versions.props
  • nuget.config
  • global.json

Both of the Version files present in the eng folder are updated when
a new dependency is available.

To work with darc locally you'll need to install the global tool, join
the arcade-contrib GitHub team, and configure your auth settings.

To add a new dependency, use the darc add-dependency command:

darc add-dependency -n Microsoft.NetCore.App.Runtime.android-arm64 -t product -v 6.0.0-preview.2.21154.6 -r https://github.com/dotnet/runtime

To update all dependencies, use the darc update-dependencies
command:

darc update-dependencies --channel ".NET 6"

To configure automatic updates, use the darc add-subscription
command to enroll a target repo/branch into updates from a particular
channel:

 darc add-subscription --channel ".NET 6" --source-repo https://github.com/dotnet/installer --target-repo https://github.com/xamarin/xamarin-android --target-branch main --update-frequency everyWeek --standard-automerge

Once a subscription is configured, a pull request will be created
automatically by the dotnet Maestro bot when dependency updates are
available.


This PR also contains a bump to .NET 6.0.100-preview.3.21168.18.
Changes: dotnet/installer@19e22a7...823c1df

The .NET 6 .apkdesc files have been updated accordingly. It seems that
System.Private.CoreLib.dll grew in size, however reductions in native
libraries and other files results in overall smaller package sizes.

Simple XA:

-"PackageSize": 2889606
+"PackageSize": 2877318

XF/XA:

-"PackageSize": 8746124
+"PackageSize": 8733836

@pjcollins pjcollins force-pushed the arcade-auto-deps branch 5 times, most recently from 0c3e346 to 199668b Compare March 18, 2021 01:23
@@ -0,0 +1,12 @@
<Dependencies>
Copy link
Member

Choose a reason for hiding this comment

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

I think @jonpryor wasn't thrilled about a new eng folder.

Is there any way to put these in build-tools? If not, we probably have to put them here.

dotnet/maui already has an eng folder, so it will be fine.

Copy link
Member Author

@pjcollins pjcollins Mar 19, 2021

Choose a reason for hiding this comment

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

I haven't found a way to provide alternate paths for files to darc, so unless we find the source and PR into that tool to check multiple paths we'll have to keep the eng folder.

Copy link
Member

Choose a reason for hiding this comment

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

There is this $(RepositoryEngineeringDir):

https://github.com/dotnet/arcade/blob/6cc4c1e9e23d5e65e88a8a57216b3d91e9b3d8db/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeTools.targets#L20

https://github.com/dotnet/arcade/blob/6cc4c1e9e23d5e65e88a8a57216b3d91e9b3d8db/src/Microsoft.DotNet.Arcade.Sdk/tools/RepoLayout.props#L44

But if we put our own value for $(RepositoryEngineeringDir) in Directory.Build.props, I don't know if the tooling would know to parse that value and use the correct value for $(RepositoryEngineeringDir).

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

Otherwise, this looks great. I like how we don't have to lookup & hardcode the runtime packs version anymore.

@jonpryor jonpryor merged commit 952e67b into main Mar 22, 2021
@jonpryor jonpryor deleted the arcade-auto-deps branch March 22, 2021 19:57
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants