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

Issue 2931183003: Implement promised watch behaviour for used == true. (Closed)

Created:
3 years, 6 months ago by scheglov
Modified:
3 years, 6 months ago
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement promised watch behaviour. 1. There are no reasons to use different watch function between computeDelta() invocations, so I moved it to the constructor. 2. We need to call it, and await, before reading files, not after. 3. Added tests. R=ahe@google.com, paulberry@google.com, sigmund@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/c2f18fc9307f3b79e15ac437326ed7b9e7b45c5e

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -42 lines) Patch
M pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart View 2 chunks +6 lines, -4 lines 0 comments Download
M pkg/front_end/lib/incremental_kernel_generator.dart View 4 chunks +17 lines, -13 lines 0 comments Download
M pkg/front_end/lib/src/incremental/file_state.dart View 4 chunks +12 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/incremental_kernel_generator_impl.dart View 2 chunks +5 lines, -6 lines 3 comments Download
M pkg/front_end/test/incremental_kernel_generator_test.dart View 4 chunks +64 lines, -17 lines 0 comments Download
M pkg/front_end/test/src/incremental/file_state_test.dart View 2 chunks +35 lines, -1 line 0 comments Download

Messages

Total messages: 10 (2 generated)
scheglov
3 years, 6 months ago (2017-06-09 21:36:27 UTC) #1
Paul Berry
Do we have any tests to verify that when a file is no longer referenced, ...
3 years, 6 months ago (2017-06-09 21:57:37 UTC) #2
scheglov
On 2017/06/09 21:57:37, Paul Berry wrote: > Do we have any tests to verify that ...
3 years, 6 months ago (2017-06-09 21:59:06 UTC) #3
Paul Berry
On 2017/06/09 21:59:06, scheglov wrote: > On 2017/06/09 21:57:37, Paul Berry wrote: > > Do ...
3 years, 6 months ago (2017-06-09 22:00:22 UTC) #5
scheglov
Committed patchset #1 (id:1) manually as c2f18fc9307f3b79e15ac437326ed7b9e7b45c5e (presubmit successful).
3 years, 6 months ago (2017-06-09 22:04:36 UTC) #7
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart File pkg/front_end/lib/src/incremental_kernel_generator_impl.dart (right): https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart#newcode83 pkg/front_end/lib/src/incremental_kernel_generator_impl.dart:83: _options.fileSystem, _uriTranslator, _salt, (uri) => watch(uri, true)); Don't we ...
3 years, 6 months ago (2017-06-14 21:56:24 UTC) #8
scheglov
https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart File pkg/front_end/lib/src/incremental_kernel_generator_impl.dart (right): https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart#newcode83 pkg/front_end/lib/src/incremental_kernel_generator_impl.dart:83: _options.fileSystem, _uriTranslator, _salt, (uri) => watch(uri, true)); On 2017/06/14 ...
3 years, 6 months ago (2017-06-14 21:58:56 UTC) #9
Siggi Cherem (dart-lang)
3 years, 6 months ago (2017-06-14 22:25:01 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incre...
File pkg/front_end/lib/src/incremental_kernel_generator_impl.dart (right):

https://codereview.chromium.org/2931183003/diff/1/pkg/front_end/lib/src/incre...
pkg/front_end/lib/src/incremental_kernel_generator_impl.dart:83:
_options.fileSystem, _uriTranslator, _salt, (uri) => watch(uri, true));
On 2017/06/14 21:58:56, scheglov wrote:
> On 2017/06/14 21:56:24, Siggi Cherem (dart-lang) wrote:
> > Don't we need to check here that `watch` is not null? maybe pass a null
> callback
> > in that case?
> > 
> > Otherwise it appears like the check in filestate for _newFileFn != null will
> > always be true and we'll try to call the callback here, even when `watch` is
> > null.
> > 
> > Let's add a simple test to cover this too.
> 
> You're right, this is a bug.
> It was fixed in a next CL.
> I will add a test.

thanks - just saw the fix you landed later, thanks! I'm just going linearly in
time on my backlog of emails :)

Powered by Google App Engine
This is Rietveld 408576698