dart-lang / sdk

The Dart SDK, including the VM, dart2js, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
9.93k stars 1.53k forks source link

Analyzer: Needs to be more clear when a plugin causes a crash #32970

Open matanlurey opened 6 years ago

matanlurey commented 6 years ago

Right now, if say, the AngularDart analyzer plugin causes a crash, it looks like the analysis server/analyzer is unstable. We need a way to be able to pinpoint that a plugin is the root cause, and help users disable if that is the case.

(I consider this a blocking issue for AngularDart v5-final)

bwilkerson commented 6 years ago

I totally agree that server needs to be protected from problems in plugins.

Can you provide me with a little more detail? There is already code in analysis server to guard against failures in plugins, so knowing a specific case that isn't covered would be helpful.

matanlurey commented 6 years ago

I believe @alorenzen might have some stack traces.

matanlurey commented 6 years ago

@bwilkerson Here is one example https://github.com/dart-lang/sdk/issues/32965

It's not clear to me (or you?) that is due to the Angular analyzer plugin.

bwilkerson commented 6 years ago

Given that the angular plugin doesn't appear anywhere in the stack trace, I have no reason to suspect that it's causing or contributing to the problem.

alorenzen commented 6 years ago

Just walked through my issues with @keertip and we think there are two things going on: 1) #32965 seems to be related to not having all of my .dart_tool/ subdirectories excluded, independent of the plugin. These are being reported as errors in Intellij's Event Log. 2) I was getting >1000 errors in the DartAnalysis window. Those go away when I disabled the plugin and clear the server cache with rm -rf ~/.dartServer/.analysis-driver/

bwilkerson commented 6 years ago

Do the errors show up again if you re-enable the plugin after clearing the cache?

alorenzen commented 6 years ago

Yes

bwilkerson commented 6 years ago

@MichaelRFairhurst Can you take a look to see if we can figure out where those errors are coming from? I'm assuming that they are false positives, but we should verify that as well.

MichaelRFairhurst commented 6 years ago

@alorenzen I'm sure I've already asked this, but do you know what version of the plugin you're loading?

If you are on <dev.46, it will not upgrade the plugin on restart, though newer versions should.

bwilkerson commented 5 years ago

@MichaelRFairhurst Is this issue still effecting users?