Skip to content

Remove repo inner build #4249

@ViktorHofer

Description

@ViktorHofer

We discussed this in a previous source-build sync meeting. Given that repo publishing doesn't run in the repo outer build anymore when constructing the product, it might be interesting to explore if the outer <--> inner repo build distinction could be eliminated. This would provide at least the following benefits:

  1. Improved UX: Having one less build layer means it's easier to debug failures and reason about the layer in which an error occurred. It also means one less binlog and log per inner build invocation (i.e. aspnetcore does more than one inner build).
  2. Performance: Avoiding the additional build phase per repo build contributes to build performance. Think about msbuild start-up cost, evaluation cost, Arcade build scripts, package downloads, etc.
  3. Separation of concerns: Today, DotNetBuild.props / SourceBuild.props in repositories condition properties, items or targets on if the current build is a VMR build (DotNetBuildOrchestrator=true). By triggering the current repo inner build directly from the VMR, those setting could be moved into the VMR orchestrator. This would also make it easier to put all binlogs into the product artifacts/log directory.

Cons:

  1. Infrastructure for building a repository from source outside of the product would presumably still require source-build specific settings to be listed in SourceBuild.props / DotNetBuild.props pre repository. This could result in duplication of inputs.

Removing repo inner builds would entail at least the following work items:

  1. Sequence the existing source-build infrastructure like prebuilt detection as a post-build step into the current repo inner build (similar to what was done for the Publishing epic).
  2. Move logic from the repos' DotNetBuild.props / SourceBuild.props into the VMR repo-projects. Make sure that all the inputs expected, are passed in. Pay special attention to the inner build args: https://github.com/dotnet/arcade/blob/c936d1bc358744730613d8ce54bc3e0294e5ea56/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets#L65-L85
  3. Make sure that building a repository from source outside of the product build still works.

Metadata

Metadata

Assignees

Labels

area-buildImprovements in source-build's own build process

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions