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

Issue 3010463002: Make creating LibraryContext async, so all its transitive clients. (Closed)

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

Description

Make creating LibraryContext async, so all its transitive clients. This prepare us for resynthesizing element model from Kernel, because KernelDriver is async, because everything in front-end is async. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/1d5de7ffd52b3362f6093c6d0de5ec49f01d064f

Patch Set 1 #

Total comments: 7

Patch Set 2 : tweak #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -22 lines) Patch
M pkg/analyzer/lib/src/dart/analysis/driver.dart View 1 14 chunks +53 lines, -19 lines 2 comments Download
M pkg/analyzer/test/src/dart/analysis/driver_test.dart View 4 chunks +104 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
scheglov
3 years, 3 months ago (2017-08-25 19:33:04 UTC) #1
Brian Wilkerson
lgtm https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart File pkg/analyzer/lib/src/dart/analysis/driver.dart (right): https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart#newcode574 pkg/analyzer/lib/src/dart/analysis/driver.dart:574: _runTestAsyncWorkDuringAnalysis(path); Missing await? Also, could we document when ...
3 years, 3 months ago (2017-08-25 19:44:12 UTC) #2
scheglov
https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart File pkg/analyzer/lib/src/dart/analysis/driver.dart (right): https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart#newcode577 pkg/analyzer/lib/src/dart/analysis/driver.dart:577: } On 2017/08/25 19:44:12, Brian Wilkerson wrote: > And ...
3 years, 3 months ago (2017-08-25 19:51:56 UTC) #3
scheglov
Committed patchset #2 (id:20001) manually as 1d5de7ffd52b3362f6093c6d0de5ec49f01d064f (presubmit successful).
3 years, 3 months ago (2017-08-25 19:52:19 UTC) #5
Paul Berry
lgtm assuming comments below are addressed https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart File pkg/analyzer/lib/src/dart/analysis/driver.dart (right): https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/analysis/driver.dart#newcode1321 pkg/analyzer/lib/src/dart/analysis/driver.dart:1321: return work != ...
3 years, 3 months ago (2017-08-25 20:01:56 UTC) #6
scheglov
3 years, 3 months ago (2017-08-25 20:30:46 UTC) #7
Message was sent while issue was closed.
I'm fixing these new comments in https://codereview.chromium.org/3003923002 now.

https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/a...
File pkg/analyzer/lib/src/dart/analysis/driver.dart (right):

https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/a...
pkg/analyzer/lib/src/dart/analysis/driver.dart:1321: return work != null ?
work(path) : null;
On 2017/08/25 20:01:55, Paul Berry wrote:
> I get scared when I see a method with a return type of Future that returns
null.
>  How about this instead?
> 
> return work != null ? work(path) : new Future.value();

Done.

https://codereview.chromium.org/3010463002/diff/1/pkg/analyzer/lib/src/dart/a...
pkg/analyzer/lib/src/dart/analysis/driver.dart:1673: Future<Null>
Function(String path) workToWaitAfterComputingResult;
On 2017/08/25 20:01:55, Paul Berry wrote:
> Would you mind adding a doc comment for this?  It's not obvious what its
> behavior is from the name.
> 
> E.g. something like:
> 
> /// If non-null, a function that should be executed asynchronously after
> /// the next result is computed.
> ///
> /// This can be used by a test to simulate file changes during analysis.

Done.

https://codereview.chromium.org/3010463002/diff/20001/pkg/analyzer/lib/src/da...
File pkg/analyzer/lib/src/dart/analysis/driver.dart (right):

https://codereview.chromium.org/3010463002/diff/20001/pkg/analyzer/lib/src/da...
pkg/analyzer/lib/src/dart/analysis/driver.dart:1321: * also include the changes.
On 2017/08/25 20:01:55, Paul Berry wrote:
> This comment doesn't actually help me understand what this method does. 
> Consider rephrasing this as a third person verb phrase (see
>
https://www.dartlang.org/guides/language/effective-dart/documentation#prefer-...)
> 
> E.g. maybe the comment should look something like:
> 
> /**
>  * Runs any asynchronous work that was injected as part of
>  * a test using
>  * [AnalysisDriverTestView.workToWaitAfterComputingResult].
>  *
>  * If the test view indicates that there is work to do,
>  * performs the work and returns a Future that will be
>  * signaled when the work completes.
>  *
>  * This gives tests a reliable way to simulate file changes
>  * during analysis.
>  * ...
>  */
> 
> (I'm guessing at some of these details; feel free to edit for correctness)

Done.

Powered by Google App Engine
This is Rietveld 408576698