Allow skeletons to be reused in frozen-partial scenarios (for inheritance margin)#61286
Conversation
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.cs
Outdated
Show resolved
Hide resolved
…CompilationTracker.cs
src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs
Outdated
Show resolved
Hide resolved
|
@sharwell for another look. Note: as part of this PR i was finding the dataflow over different operations confusing. So i split this up into two remote calls. One for getting global imports, the other for getting symbol information. |
src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs
Outdated
Show resolved
Hide resolved
…ceMarginService_Helpers.cs
src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs
Outdated
Show resolved
Hide resolved
…ceMarginService_Helpers.cs
| { | ||
| // If we're starting from a document, use it to go to a frozen partial version of it to lower the amount of | ||
| // work we need to do running source generators or producing skeleton references. | ||
| if (document != null && frozenPartialSemantics) |
There was a problem hiding this comment.
I feel the 'frozenPartialSemantics' pattern is somewhat strange to me. (The flag seems always to be true)
Is this the pattern that Sam mentioned in the previous comment?
There was a problem hiding this comment.
You are correct. It is always true. It's just trying to be explicit on both endsThat it wants a frozen partial view of the solution :-)
Cosifne
left a comment
There was a problem hiding this comment.
LGTM except for the strange always true flag.
But if this is our pattern then that's fine : )
This PR now allows skeleton references to be reused in frozen-partial scenarios. Now, if we have a frozen partial project, and it has a p2p reference to a different language, we'll just reuse whatever skeleton we built for that language last, not caring if it is up to date or not with teh compilation for that project. This allows some amount of semantics to flow p2p, without taking on the full cost of producing the full skeleton.
The remote side of inheritance margin is also updated to use frozen-partial for the data it is operating on. This will hopefully get it to consume far less work producing skeletons in the p2p case.