Dart Analysis Server server crashed on generics refactor #57058
Labels
analyzer-crash-report
Issues which have been reported due to an analysis server crash
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Flutter master.
I’m working on a project that structure around a core class:
sealed class Operation<T, C, R>
Everything was working well but I found a solution to simplify to
<T, R>
The moment I started the refactor I got this log analyze crashed living
whole source no more traversable.
Current status is I've been able to complete the refactor by hand, grep and memory
so I'm not sure what was triggering this crash as the code base is as deep as wide.
The main culprit seems around a Mixin without generics (dynamic) on Operation<T, C, R>
A warning was thrown before crash that sub classes cannot implement both the typed and generic methods.
I'm sorry I can not pinpoint more precisely the root cause to reproduce it.
Some more not much actionnables hints but maybe helpful:
I was able to start the conversion starting by the leaf-classes and then trying to go up
in the hierarchy. Changing the root class generic, removing C, was my last operation to have it
work.
Starting the refactor by the root class nearly instantly kill the analyzer.
Dear analyzer team, you have all my gratitude for this tool.
I've never felt so alone with my own code than when it is not active anymore... ;)
The text was updated successfully, but these errors were encountered: