Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Issue 246603005: Use AnalysisServer.running only to track whether server has been shut down. (Closed)

Created:
6 years, 8 months ago by Paul Berry
Modified:
6 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use AnalysisServer.running only to track whether server has been shut down. Previously, AnalysisServer.run() and AnalysisServer.performTask() also tried to use this variable to track whether there was a pending call to performTask() on the event queue. The resulting confusion prevented analysis from ever running. It turns out that we don't need to separately track whether there is a pending call to performTask(), as long as we enforce the invariant that there is a pending call to performTask() exactly when contextWorkQueue is non-empty. R=brianwilkerson@google.com, danrubel@google.com Committed: https://code.google.com/p/dart/source/detail?r=35323

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -31 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 5 chunks +50 lines, -30 lines 0 comments Download
M pkg/analysis_server/lib/src/socket_server.dart View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/analysis_server/test/analysis_server_test.dart View 3 chunks +81 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/mocks.dart View 2 chunks +202 lines, -0 lines 3 comments Download

Messages

Total messages: 5 (0 generated)
Paul Berry
I'm not thrilled about the amount of boilerplate code I had to write in order ...
6 years, 8 months ago (2014-04-22 20:28:36 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/246603005/diff/1/pkg/analysis_server/test/mocks.dart File pkg/analysis_server/test/mocks.dart (right): https://codereview.chromium.org/246603005/diff/1/pkg/analysis_server/test/mocks.dart#newcode170 pkg/analysis_server/test/mocks.dart:170: class MockAnalysisLogger extends Logger { Try the following ...
6 years, 8 months ago (2014-04-22 22:46:03 UTC) #2
danrubel
LGTM
6 years, 8 months ago (2014-04-23 02:04:21 UTC) #3
Paul Berry
Committed patchset #1 manually as r35323 (presubmit successful).
6 years, 8 months ago (2014-04-23 18:36:02 UTC) #4
Paul Berry
6 years, 8 months ago (2014-04-23 18:36:26 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/246603005/diff/1/pkg/analysis_server/test/moc...
File pkg/analysis_server/test/mocks.dart (right):

https://codereview.chromium.org/246603005/diff/1/pkg/analysis_server/test/moc...
pkg/analysis_server/test/mocks.dart:170: class MockAnalysisLogger extends Logger
{
On 2014/04/22 22:46:03, Brian Wilkerson wrote:
> Try the following
> 
> @proxy
> class MockAnalysisLogger implements Logger {
>   noSuchMethod(Invocation invocation) => _unexpected();
> }
> 
> You could even implement _unexpected to take an Invocation and produce a
better
> error message (such as which method was invoked and on which class).

Done, thanks.

Powered by Google App Engine
This is Rietveld 408576698