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

Issue 1814013004: Add source kind to the incremental cache. (Closed)

Created:
4 years, 9 months ago by scheglov
Modified:
4 years, 9 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -87 lines) Patch
M pkg/analyzer/lib/src/summary/format.dart View 6 chunks +55 lines, -17 lines 0 comments Download
M pkg/analyzer/lib/src/summary/format.fbs View Binary file 0 comments Download
M pkg/analyzer/lib/src/summary/idl.dart View 1 chunk +19 lines, -8 lines 4 comments Download
M pkg/analyzer/lib/src/summary/incremental_cache.dart View 7 chunks +93 lines, -58 lines 2 comments Download
M pkg/analyzer/test/src/summary/incremental_cache_test.dart View 4 chunks +46 lines, -4 lines 0 comments Download
M pkg/analyzer/test/src/summary/test_all.dart View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
scheglov
4 years, 9 months ago (2016-03-18 17:00:56 UTC) #1
Brian Wilkerson
I'm going to hand this over to Paul.
4 years, 9 months ago (2016-03-18 17:40:27 UTC) #4
Paul Berry
lgtm https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summary/idl.dart File pkg/analyzer/lib/src/summary/idl.dart (right): https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summary/idl.dart#newcode65 pkg/analyzer/lib/src/summary/idl.dart:65: * or `package:foo/bar.dart`. Document what happens to this ...
4 years, 9 months ago (2016-03-18 18:38:14 UTC) #5
scheglov
Committed patchset #1 (id:1) manually as 8f265d90f0908f091c8fa6f3ae0aa99ab04f0d2b (presubmit successful).
4 years, 9 months ago (2016-03-18 19:41:45 UTC) #7
scheglov
4 years, 9 months ago (2016-03-18 19:42:06 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summar...
File pkg/analyzer/lib/src/summary/idl.dart (right):

https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/idl.dart:65: * or `package:foo/bar.dart`.
On 2016/03/18 18:38:14, Paul Berry wrote:
> Document what happens to this field when [kind] is CacheSourceKind.part.  (I
> assume it's empty?)

Done.

https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/idl.dart:72: * or `package:foo/bar.dart`.
On 2016/03/18 18:38:14, Paul Berry wrote:
> Same here

Done.

https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summar...
File pkg/analyzer/lib/src/summary/incremental_cache.dart (right):

https://codereview.chromium.org/1814013004/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/incremental_cache.dart:274:
_writeCacheSourceContent(part.source,
On 2016/03/18 18:38:14, Paul Berry wrote:
> As per our discussion, this could corrupt the cache in the event that there is
> invalid code.  For example:
> 
> a.dart:
> import 'b.dart';
> part 'c.dart';
> 
> b.dart:
> import 'c.dart';
> 
> c.dart:
> ...
> 
> c.dart will first be inserted into the cache as a part, then it will be
inserted
> into the cache as a library (overwriting the old data).  Let's say c.dart is
> actually intended to be a part.  If the user tries to correct the error by
> removing the line "import 'c.dart';", then the cache will still say that
c.dart
> is a library.
> 
> If you'd like to address this in a future CL, please add a TODO comment so
that
> we don't forget about this corner case.

Done.

Powered by Google App Engine
This is Rietveld 408576698