Fix failures to use VBCSCompiler.exe for Roslyn builds#46671
Fix failures to use VBCSCompiler.exe for Roslyn builds#46671sharwell merged 2 commits intodotnet:masterfrom
Conversation
eng/targets/Imports.targets
Outdated
There was a problem hiding this comment.
The underlying issue here is that when the server sees missing dependencies loading analyzers it considers that a fatal state and begins tearing down the compiler server. I'm no longer convinced that is the right thing to do.
The history there is that when originally authoring the server we were very concerned about assembly load address space pollution. Given every analyzer loads into the same AppDomain on desktop over time they can pollute the assembly load space such that a given compilation in the compiler server would fail due to inability to load an analyzer but it would succeed when run on the command line.
We were very concerned about this space when we originally wrote the server and when in doubt we leaned towards the paranoid interpretation of the error (when in doubt, shut down).
Thinking through this now i think missing dependencies should not be a fatal error. If it misses in the server, it's going to miss in the command line. Assembly load space pollution can really only cause incorrect dependencies to load (which we handle) but can't really see a way it would cause them to reasonably not load.
Possibly the implementation of ShadowCopyAnalyzerAssemblyLoader needs to change to better support analyzers. Overall though this work around doesn't really scale to customers. Feel like we need a sustainable solution for this.
There was a problem hiding this comment.
Overall though this work around doesn't really scale to customers. Feel like we need a sustainable solution for this.
I totally agree with this, but can we have the workaround in the meantime to avoid the build time regression?
There was a problem hiding this comment.
I'm fine with a work around but want to link it to the long term issue. Just a sec.
1e6f13a to
1b41d8e
Compare
Rebuild time locally: