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

Issue 1759333002: Fix regression for import suggestions (Closed)

Created:
4 years, 9 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

Fix regression for import suggestions Imports weren't being suggested for implicit source files, for example files from other analysis roots. BUG= R=brianwilkerson@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/ae009e0870773989b311a34659e2b836c6d7e2c3

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -16 lines) Patch
M pkg/analysis_server/lib/src/services/correction/fix_internal.dart View 1 chunk +1 line, -1 line 5 comments Download
M pkg/analysis_server/test/analysis_abstract.dart View 4 chunks +7 lines, -4 lines 0 comments Download
M pkg/analysis_server/test/edit/fixes_test.dart View 4 chunks +40 lines, -11 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
skybrian
4 years, 9 months ago (2016-03-03 22:26:33 UTC) #2
Brian Wilkerson
LGTM, but Dan knows the completion code better than I do, and I'd like his ...
4 years, 9 months ago (2016-03-03 22:33:28 UTC) #4
danrubel
On 2016/03/03 22:33:28, Brian Wilkerson wrote: > LGTM, but Dan knows the completion code better ...
4 years, 9 months ago (2016-03-08 23:06:44 UTC) #5
danrubel
4 years, 9 months ago (2016-03-08 23:07:00 UTC) #7
scheglov
lgtm https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode1519 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:1519: context.getResult(librarySource, LIBRARY_ELEMENT4); Do you need LIBRARY_ELEMENT4 or LIBRARY_ELEMENT1 ...
4 years, 9 months ago (2016-03-09 19:05:32 UTC) #8
skybrian
https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode1519 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:1519: context.getResult(librarySource, LIBRARY_ELEMENT4); On 2016/03/09 19:05:32, scheglov wrote: > Do ...
4 years, 9 months ago (2016-03-09 19:15:05 UTC) #9
scheglov
https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode1519 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:1519: context.getResult(librarySource, LIBRARY_ELEMENT4); On 2016/03/09 19:15:05, skybrian wrote: > On ...
4 years, 9 months ago (2016-03-09 19:18:21 UTC) #10
skybrian
https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode1519 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:1519: context.getResult(librarySource, LIBRARY_ELEMENT4); On 2016/03/09 19:18:21, scheglov wrote: > On ...
4 years, 9 months ago (2016-03-09 19:33:47 UTC) #11
scheglov
LGTM https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart File pkg/analysis_server/lib/src/services/correction/fix_internal.dart (right): https://codereview.chromium.org/1759333002/diff/1/pkg/analysis_server/lib/src/services/correction/fix_internal.dart#newcode1519 pkg/analysis_server/lib/src/services/correction/fix_internal.dart:1519: context.getResult(librarySource, LIBRARY_ELEMENT4); On 2016/03/09 19:33:47, skybrian wrote: > ...
4 years, 9 months ago (2016-03-09 19:36:07 UTC) #12
skybrian
Committed patchset #1 (id:1) manually as ae009e0870773989b311a34659e2b836c6d7e2c3 (presubmit successful).
4 years, 9 months ago (2016-03-09 20:59:32 UTC) #14
skybrian
4 years, 9 months ago (2016-03-09 21:10:09 UTC) #15
Message was sent while issue was closed.
It seems suspicious that just above this change, the code to resolve an SDK
library uses LIBRARY_ELEMENT1.

But maybe it doesn't matter? The next lines are:

        Element element = getExportedElement(libraryElement, name);
        if (element == null) {
          continue;
        }

So even if getExportedElement() really requires LIBRARY_ELEMENT4, if this method
returns null when its requirements aren't met, it has the same effect and nobody
would notice.

Powered by Google App Engine
This is Rietveld 408576698