Refactor/Unify Build and Graph OM and API#10172
Merged
JanKrivanek merged 18 commits intodotnet:mainfrom Jul 4, 2024
Merged
Conversation
Co-authored-by: Mariana Dematte <magarces@microsoft.com>
dfederm
reviewed
Jun 6, 2024
3d41e7d to
e6771c4
Compare
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
rekicking CLA bot |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
rekicking cla |
3 tasks
maridematte
approved these changes
Jun 20, 2024
Member
maridematte
left a comment
There was a problem hiding this comment.
It looks good to me, but because there are so many changes to just nullable variables it gets harder to review this. Maybe all the nullable changes could have been in another PR just so we can focus on the functionality of the refactor.
Co-authored-by: Mariana Dematte <magarces@microsoft.com>
surayya-MS
approved these changes
Jul 1, 2024
3 tasks
f-alizada
reviewed
Jul 1, 2024
Member
Author
|
Experimental VS insertion: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/562572 (build goes fine now!) |
18 tasks
This was referenced Aug 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisity for indicating Build Submissions in Build Events (which will be needed by BuildCheck to detect Restore)
Context
Build and Graph Build OM and API is largely duplicated. Building on top of this (e.g. to add 'BuildSubmissionStartedEventArgs') would require even further duplication of code.
So let's deduplicate the OM and API.
Changes Made
BuildManagerBuildManagerImportant notes:
I sealed the existing OM - letting it open was a design mistake that doesn't have sane usage. Hopefully there is none - we can easily revert if there proves to be some usages.
For some reasons the Results Cache is applicable only for 'standard' build requests - not for graph build requests. I do not fully understand why. I have left that aspect untouched
msbuild/src/Build/BackEnd/Components/Caching/IResultsCache.cs
Line 33 in 9bea802
ExecuteSubmissiondiffers very significantly for BuildRequest and GraphBuildRequest - those are left in their separate functions (but at least there is a single entrypoint function to them)The entrypoint location of where we should introduce emiting of
BuildRequestStartedis indicated in code by TODO with some hints (https://github.com/dotnet/msbuild/pull/10172/files#diff-2b0716a511d8f4ee690ebd5c3a59dec1e3f9a5eab4ab2a80a1018820a658accbR1370-R1372) - so once this PR is merged, there hopefully should be a no blocker for Analyzers prototyping - Detect and skip restore (evaluation and execution) #9747 (FYI @maridematte)FYI @dfederm - this is heavily touching graph requesting - so your PoV would be very helpful