Open tmat opened 1 year ago
@cston to comment
We should also skip CLS compliance analysis when compiling deltas.
That seems reasonable.
@333fred how feasible do you think this is?
Seems rather infeasible to me. How could we know if an updated symbol invalidates some other usage without compiling the whole program? Unless we can guarantee that no API surface area changed, there will always be a case (sometimes reasonable, sometimes pathological) where the updates could break something that wasn't updated.
We already allow applying changes that are correct locally but do not compile globally. I.e. only the updated symbols need to be correct, other symbols might have errors. For example, you can change a signature of any method (including public) while keeping the callers unchanged.
As long as we can emit correct IL/metadata for the affected symbols we should not need to validate other symbols.
I see. Seems more possible then; I would want the API to be pretty EnC specific, and not something someone can stumble into by accident, but if we don't care about the impact on the rest of the compilation, it seems more reasonable to me.
Definitely. I don't think we actually need new API - we know that we are analyzing compilation for EnC delta when this code is called from EmitDifference.
C# been addressed. VB still need to be changed for similar fixes.
When we emit EnC deltas the IDE passes a set of updated symbols to the compiler. Then
CompileMethod
is only called on those symbols.However,
GetSourceDeclarationDiagnostics
called before that forces completion of the entireAssemblySymbol
. Could only the symbols that were updated be completed?From customer trace:
We should also skip CLS compliance analysis when compiling deltas.