-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Avoid cyclic references during incremental project update #58720
Conversation
src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.SolutionCreator.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks solid, and the tests looks good. I privately had some concern with @sharwell about whether this is producing more updates to the project dependency graph than we'd want; we have optimizations for addition/removal but the .With() that just blows away all the references won't have any of those running. He correctly observed that's more or less what we're doing today, so if there's performance wins here this may not make things any worse than they are now.
@sharwell @jinujoseph Given we've had a bunch of dupes of this, do we want to take this for 17.1? It seems nice and low risk. |
This change operates under the assumption that neither the starting state nor the final state include any cycles. By removing all project references from projects that change their reference sets prior to other work, we ensure extraneous references cannot lead to an invalid intermediate state. This increases the amount of work required to complete an incremental update when project references change, but does not impact the more common updates where all project references are unchanged. Fixes dotnet#52578
c7673d6
to
bcc2112
Compare
📝 Commit bcc2112 is based on 17.1 so we can merge it there without any rebase/porting if we need to. |
Which VS update will contain this fix? |
17.2 Preview 1 will contain this fix. @vdevappa Since you're asking, I'm assuming you've hit this issue. If this is the case, I'm curious how you are hitting it. It seems extremely difficult to hit this accidentally. |
@vdevappa have you submitted a feedback ticket to developer community on this in the past? Can you either create a new one or update the existing one (and link me to it) to contain the following:
Somewhere in one (or both) of these is a conditional |
"Since the past six months, Visual Studio has been showing errors at the top which really disrupt my DEV experience." |
@vdevappa that issue is too old and all the attached diagnostics were cleared out. I think we'll need a new one filed instead. |
This change operates under the assumption that neither the starting state nor the final state include any cycles. By removing all project references from projects that change their reference sets prior to other work, we ensure extraneous references cannot lead to an invalid intermediate state. In terms of graph theory, this change relies on the fact that any subset of edges from an acyclic directed graph will also be an acyclic directed graph.
This increases the amount of work required to complete an incremental update when project references change, but does not impact the more common updates where all project references are unchanged.
Fixes #52578