Conversation
The best fix here is to resolve those issues. This has come up before, but this is a workaround I would prefer not to have. If implemented, people would just use it without raising issues for the underlying bugs, and then complain that the extension is buggy and you have to keep reloading. So, this should be considered a last resort and we should push on the other bugs first. If we hit blockers that mean they can't all be solved, then we should consider this. I don't think we should merge it unless we hit these though. (Apologies with the delay for #1970, I was out of the office for a few weeks last month so I didn't get much done.) |
|
Alright, I'm waiting for #1970 then, this PR can always be reopened. |
|
I just had another idea: |
|
I think a command to run Before adding an automatic reanalyze, I think we should try to figure out if it's an analysis server bug that it's required (it should pick up changes in files automatically, and incremental work is much faster than reanalyzing a large project). I'm just going to do some digging with your repro from #1970. |
This is slightly related to #1970.
Ideally it would not be needed, but I had few situations where I had to run "reload window" because analyzer was not handling updated packages, etc.
So instead of "reload window" I could just force the analyzer to reanalyze. The additional bonus is that other extensions can also run this command, which will be useful for my extension for r_flutter.
I basically copied the implementation of
dart.openAnalyzerDiagnosticsso there are no tests or anything because the original command didn't have them.