Description
The --graph
/ --graphBuild
msbuild CLI option enables the static graph build feature. From discussion with @rainersigwald:
no, Arcade doesn't use it by default
specs at https://github.com/dotnet/msbuild/blob/master/documentation/specs/static-graph.md but they're not good for high-level/motivation
in brief:
MSBuild normally discovers dependencies just in time: a project is building and invokes the MSBuild task to build another project. That works fine, but means we can't do some things like advanced scheduling (because we don't know what's going to be built in advance) and caching at the project level. MSBuild static graph restricts the build to define a graph of ProjectReferences in advance and then builds based on that graph, rather than just-in-time. That can help some builds
it's mostly helpful when combined with a build system that can cache at the project level, like CloudBuild does internally
but it can have some benefits even without that
We should see if enabling this feature reduces our build times and even if not, a predictable static graph is preferred over a just-in-time hard to reason about graph so it might be a good option anyway.
@jaredpar this would be a pre-cursor for using CloudBuild in CI.
cc @dotnet/runtime-infrastructure
Metadata
Metadata
Assignees
Type
Projects
Status