-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Define build dependencies between libraries, runtime, host, installers, native libraries #43110
Comments
Tagging subscribers to this area: @ViktorHofer |
It means that incremental build of e.g. I find myself using |
My preference would be to make |
Can you elaborate on what the
Our libraries build dependencies are purely managed, aren't they? The runtime and the host are only required for composing the runtime pack and the shared framework for our testhost. Both are required for packaging and testing the product but not for building the BCL, right? |
It is Compare this:
vs. this:
It is still annoying that it builds 9 versions of System.Runtime.Serialization.Formatters.Tests.dll when I only want one. I did not get bothered enough by this to find the right command line option to workaround that. |
That would be accomplished by passing in the TargetFramework that you are interested in, ie
Awesome, I didn't know that one exists. We should definitely document it as it saves a lot of time when only the library invoked has changed.
It's clear to me why you picked that one, as it has the most dependencies of all the test libraries. We have couple of work items that should make incremental builds faster:
I hope that we can explore even more options to make incremental builds faster to get to a point where |
Right, my point is that once you make the dependencies correctly represented repo-wide, everything is going to look like this - every library is going to have huge dependency graph. |
I think I mentioned on Teams that I plan to enable that but never filed an issue for it: #43118 |
Right, that's primarily the reason why we are still not representing dependencies for shared framework libraries as ProjectReferences and instead use named references. That said, we know that that would enable scenarios that community members are interested in, i.e. being able to build inside Visual Studio or build an individual library, from a fresh clone. For libraries we are considering doing that but not before incremental builds are fast enough. |
I'm also concerned with the impact to inner-loop performance.
Somehow git status manages to do this in under 1s for the entire repo 🤔 One middle-ground here would be a looser coupling dependency. One that doesn't necessarily support full incremental but would support building an absent dependency. |
I think this is a great improvement for people new to the repo, and I hope this could actually be a huge win for inner-loop performance, in that you could eventually only build the stuff you actually need to. I think rather then preemptively assume we can't do a fast incremental build, we should try it and figure out what the big rocks are. We can wait to merge the change until we're happy with the performance. |
@agocke as we just talked about this in the stand-up, would you mind summarizing your thoughts on this? |
Incorporating the higher-level goal and what Jan said, I think the first step is to improve our up-to-date check performance. Per #47022, building the I think next steps are to improve this number as much as possible. I've already identified some bigger rocks (crossgen, clretwrc), but as we go we'll need to profile and figure out what's taking so much time. |
Today we have the subset system which sits on top of our build system and allows to only build specific parts of the repository. If a developer working mainly on libraries tries to invoke tests without having the runtime built first, that fails. In an ideal world we would declare dependencies between our components (libraries, runtimes, hosts and installers) with up-to-date checks so that these manual steps aren't necessary and components are kept up-to-date with incremental builds. This might require runtimes and hosts to depend on Ninja.
I imagine that we could compose the runtime pack with all its content purely based on ProjectReferences that would fan out to the individual parts (libraries, host, runtime, native libraries).
cc @dotnet/runtime-infrastructure @jkotas
The text was updated successfully, but these errors were encountered: