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

Issue 2549143007: Implement 'Import Library' Quick Fix for the new analysis driver. (Closed)

Created:
4 years ago by scheglov
Modified:
4 years ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement 'Import Library' Quick Fix for the new analysis driver. It turned out to be easier than I thought is would be. The potential problem was to find correspondence between AnalysisResult and the AnalysisDriver instance to request top-level declarations in. But if we just include the AnalysisDriver into AnalysisResult, this solves the problem. This creates another problem though - now we need to be careful to not cache an instance of AnalysisResult for a long time. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/402cd0b6466e056386c44e3cd2f607d29f2db370

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -5 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/analysis_server/lib/src/edit/edit_domain.dart View 1 chunk +6 lines, -5 lines 0 comments Download
M pkg/analyzer/lib/src/dart/analysis/driver.dart View 3 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
scheglov
4 years ago (2016-12-06 22:51:04 UTC) #1
Brian Wilkerson
lgtm
4 years ago (2016-12-06 22:58:27 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as 402cd0b6466e056386c44e3cd2f607d29f2db370 (presubmit successful).
4 years ago (2016-12-06 23:01:00 UTC) #4
Paul Berry
4 years ago (2016-12-07 14:57:34 UTC) #5
Message was sent while issue was closed.
I agree that including the AnalysisDriver inside the AnalysisResult seems
bad--it's a potential trap for clients.  What if instead we allow the client to
suppy an "AnalysisDriver key" (which can be any object) when they create the
AnalysisDriver, and then we include that key in the AnalysisResult?

Then analysis server could use this "key" to associate a unique ID with every
AnalysisDriver, and when it needs to map an AnalysisResult to an AnalysisDriver,
it can just look it up in a map?

Powered by Google App Engine
This is Rietveld 408576698