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

Issue 2982993003: Remove UriReferencedElement with its uri/uriOffset/uriEnd properties. (Closed)

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

Description

Remove UriReferencedElement with its uri/uriOffset/uriEnd properties. The 'Move File' refactoring does not work, so I comment out most of its code. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/bdd69ccd6c330e4755a447964a1f1021be034f75

Patch Set 1 #

Total comments: 1

Patch Set 2 : Merge. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -370 lines) Patch
M pkg/analysis_server/lib/src/services/correction/fix_internal.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/refactoring.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/rename_import.dart View 4 chunks +21 lines, -4 lines 0 comments Download
M pkg/analysis_server/lib/src/status/element_writer.dart View 1 chunk +0 lines, -3 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart View 2 chunks +12 lines, -6 lines 0 comments Download
M pkg/analyzer/lib/dart/element/element.dart View 4 chunks +3 lines, -28 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/builder.dart View 2 chunks +0 lines, -10 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 1 9 chunks +18 lines, -189 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/handle.dart View 3 chunks +0 lines, -27 lines 0 comments Download
M pkg/analyzer/lib/src/generated/error_verifier.dart View 2 chunks +14 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/summary/resynthesize.dart View 1 chunk +0 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 chunk +0 lines, -3 lines 0 comments Download
M pkg/analyzer/test/src/summary/element_text.dart View 4 chunks +13 lines, -11 lines 0 comments Download
M pkg/analyzer/test/src/summary/resynthesize_common.dart View 1 20 chunks +27 lines, -69 lines 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 6 chunks +6 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
scheglov
3 years, 5 months ago (2017-07-18 20:03:44 UTC) #1
Paul Berry
Clarifying question: when you say "The 'Move File' refactoring does not work, so I comment ...
3 years, 5 months ago (2017-07-18 21:01:06 UTC) #2
scheglov
On 2017/07/18 21:01:06, Paul Berry wrote: > Clarifying question: when you say "The 'Move File' ...
3 years, 5 months ago (2017-07-18 21:04:42 UTC) #3
Paul Berry
On 2017/07/18 21:04:42, scheglov wrote: > On 2017/07/18 21:01:06, Paul Berry wrote: > > Clarifying ...
3 years, 5 months ago (2017-07-18 21:05:06 UTC) #4
scheglov
PTAL I removed the "Move File" refactoring and updated this CL.
3 years, 5 months ago (2017-07-19 02:23:10 UTC) #5
Paul Berry
lgtm
3 years, 5 months ago (2017-07-19 16:26:05 UTC) #6
scheglov
Committed patchset #2 (id:20001) manually as bdd69ccd6c330e4755a447964a1f1021be034f75 (presubmit successful).
3 years, 5 months ago (2017-07-19 16:31:10 UTC) #8
Brian Wilkerson
> It is (a) - the refactoring has been broken since moving to Analysis > ...
3 years, 5 months ago (2017-07-19 22:30:00 UTC) #9
scheglov
3 years, 5 months ago (2017-07-19 23:59:44 UTC) #10
Message was sent while issue was closed.
On 2017/07/19 22:30:00, Brian Wilkerson wrote:
> > It is (a) - the refactoring has been broken since moving to Analysis
> > Driver. IDEA does not use it, so there is little incentive to support it.
> 
> Does this change make it significantly more difficult to support the
> refactoring? I ask because I think IntelliJ *should* use it in order to
provide
> a reasonable level of Dart support, so I don't want us to get into a situation
> where it's prohibitively expensive to add the support back in.

  No, it does not.

The model of thinking I tried to apply recently is something what Paul suggested
- if we have to pay a reasonable price for some rarely used operation, like
search or refactoring, we will pay. Even if in theory it would be possible to
make it faster, but the cost is additional APIs or work which should be done.

  The "Move File" refactoring is very rare, so we can make it not very fast. The
worst case is that we fully resolve defining unit of every library that imports
the file being moved. If this happens to be a problem (and I don't think it
will), we can include additional information into index - list of (uriString,
offset, length) for every URI directive in the unit. This information is very
cheap both to create and access (when analysis is done, it is always in the byte
store).

Powered by Google App Engine
This is Rietveld 408576698