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

Issue 1737693004: Update SOURCE_KIND when a missing source file appears (Closed)

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

Description

Update SOURCE_KIND when a missing source file appears If the source kind isn't updated, we get a bogus error: The imported library ... must not have a part-of directive. This error is calculated in BuildDirectiveElementsTask. based on SOURCE_KIND. SOURCE_KIND is based on whether MODIFICATION_DATE is -1, so make sure we invalidate MODIFICATION_DATE. Also, fix an issue where _sourceChanged would have no effect if incremental resolution isn't run, because the content has already been updated and is therefore equal. Also, remove unused RelativeFileUriResolver and clarify comments around missing Source handling. BUG=https://github.com/dart-lang/sdk/issues/25808 R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/41ce555c2e1c8239ed460f2471f7eb2082f6fd48

Patch Set 1 #

Total comments: 14

Patch Set 2 : fix test and revert unrelated changes #

Patch Set 3 : oops, fix the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -12 lines) Patch
M pkg/analyzer/lib/src/context/context.dart View 1 2 3 chunks +20 lines, -9 lines 0 comments Download
M pkg/analyzer/test/generated/compile_time_error_code_test.dart View 1 2 2 chunks +22 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/context/context_test.dart View 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (2 generated)
skybrian
This change can't be committed yet because four tests in context_test.dart fail. However, the tests ...
4 years, 10 months ago (2016-02-26 06:44:46 UTC) #2
Brian Wilkerson
> This change can't be committed yet because four tests in > context_test.dart fail. However, ...
4 years, 10 months ago (2016-02-26 15:07:32 UTC) #3
skybrian
Test failures: FAIL: LimitedInvalidateTest | test_noChange_thenChange cache state of /b.dart LIBRARY_ELEMENT: wanted INVALID, got: VALID ...
4 years, 10 months ago (2016-02-26 17:22:06 UTC) #4
Brian Wilkerson
I can't tell for sure just by looking at the code, but the clue I'd ...
4 years, 10 months ago (2016-02-26 17:59:37 UTC) #5
skybrian
https://codereview.chromium.org/1737693004/diff/1/pkg/analyzer/lib/src/context/context.dart File pkg/analyzer/lib/src/context/context.dart (right): https://codereview.chromium.org/1737693004/diff/1/pkg/analyzer/lib/src/context/context.dart#newcode1021 pkg/analyzer/lib/src/context/context.dart:1021: // Disable it since we know the file changed. ...
4 years, 10 months ago (2016-02-26 18:09:01 UTC) #6
Brian Wilkerson
https://codereview.chromium.org/1737693004/diff/1/pkg/analyzer/lib/src/context/context.dart File pkg/analyzer/lib/src/context/context.dart (right): https://codereview.chromium.org/1737693004/diff/1/pkg/analyzer/lib/src/context/context.dart#newcode1823 pkg/analyzer/lib/src/context/context.dart:1823: entry.setState(MODIFICATION_TIME, CacheState.INVALID); It probably doesn't matter here, but in ...
4 years, 10 months ago (2016-02-26 18:35:57 UTC) #7
skybrian
It appears that this call has unexpected side effects: entry.setState(CONTENT, CacheState.FLUSHED) Skipping the flush causes ...
4 years, 10 months ago (2016-02-26 19:54:17 UTC) #8
Brian Wilkerson
On 2016/02/26 19:54:17, skybrian wrote: > It appears that this call has unexpected side effects: ...
4 years, 10 months ago (2016-02-26 20:30:08 UTC) #9
skybrian
On 2016/02/26 20:30:08, Brian Wilkerson wrote: > On 2016/02/26 19:54:17, skybrian wrote: > > It ...
4 years, 10 months ago (2016-02-26 22:19:57 UTC) #10
Brian Wilkerson
LGTM
4 years, 10 months ago (2016-02-26 22:46:54 UTC) #11
skybrian
4 years, 9 months ago (2016-02-27 02:08:05 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
41ce555c2e1c8239ed460f2471f7eb2082f6fd48 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698