roslyn: CompilationEndAction not being called.
The UseAutoProp analyzer looks like this:
public sealed override void Initialize(AnalysisContext context)
{
context.RegisterCompilationStartAction(csac =>
{
var analysisResults = new ConcurrentBag<AnalysisResult>();
var ineligibleFields = new ConcurrentBag<IFieldSymbol>();
csac.RegisterSymbolAction(sac => AnalyzeProperty(analysisResults, sac), SymbolKind.Property);
RegisterIneligibleFieldsAction(csac, ineligibleFields);
csac.RegisterCompilationEndAction(cac => Process(analysisResults, ineligibleFields, cac));
});
}
Even though we call RegisterCompilationEndAction, the call to the registered lambda never happens.
This means that UseAutoProp doesn’t actually work at all.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 62 (61 by maintainers)
Capturing notes from @heejaechang ( after discussion we had following this https://github.com/dotnet/roslyn/pull/19067 )
@jinujoseph are we going to push making compilation end analyzer first citizen in VS as we discussed in the meeting? I think we should have bug opened to track the work.
the work we discussed
…
we want (1) to gives users full experience. (2) is for people with solution whose machine can’t handle/beefy enough to handle FSA. (3, 4) are too make compilation end analyzer/fixer has similar experience as other analyzer/fixer (5, 6) are needed so that we can run limit work we needs for compilation end analyzers.