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

Issue 880643005: Fix "reanalyze sources" when there are unsaved files. (Closed)

Created:
5 years, 11 months ago by Paul Berry
Modified:
5 years, 11 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org, danrubel
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix "reanalyze sources" when there are unsaved files. The analysis server now maintains a single content cache which is shared by all contexts; this allows it to persist the content cache across reanalysis (which destroys all contexts and recreates them from scratch). Two other bugs are fixed in the process: - If a file is analyzed in multiple contexts, then editing it will cause all affected contexts to be notified of the change. (Note that this could potentially account for some other strange behaviors we've seen recently, such as incorrect semantic highlighting and lingering errors/warnings.) - If the client supplies a ChangeContentOverlay for a file which currently has no overlay, the proper error is generated. I plan to submit tests for these two bugs in a follow-up CL. R=brianwilkerson@google.com Committed: https://code.google.com/p/dart/source/detail?r=43163

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -97 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 3 chunks +49 lines, -36 lines 1 comment Download
M pkg/analysis_server/test/analysis/reanalyze_test.dart View 2 chunks +40 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/generated/engine.dart View 10 chunks +95 lines, -60 lines 0 comments Download
M pkg/analyzer/test/generated/engine_test.dart View 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
Paul Berry
5 years, 11 months ago (2015-01-26 22:43:21 UTC) #2
Brian Wilkerson
LGTM https://codereview.chromium.org/880643005/diff/1/pkg/analysis_server/lib/src/analysis_server.dart File pkg/analysis_server/lib/src/analysis_server.dart (right): https://codereview.chromium.org/880643005/diff/1/pkg/analysis_server/lib/src/analysis_server.dart#newcode899 pkg/analysis_server/lib/src/analysis_server.dart:899: String oldContents = _overlayState.getContents(source); There is a subtle ...
5 years, 11 months ago (2015-01-26 23:05:02 UTC) #3
Paul Berry
On 2015/01/26 23:05:02, Brian Wilkerson wrote: > LGTM > > https://codereview.chromium.org/880643005/diff/1/pkg/analysis_server/lib/src/analysis_server.dart > File pkg/analysis_server/lib/src/analysis_server.dart (right): ...
5 years, 11 months ago (2015-01-26 23:18:29 UTC) #4
Paul Berry
5 years, 11 months ago (2015-01-26 23:26:51 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 43163 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698