Commit Graph

158 Commits

Author SHA1 Message Date
Konstantin Shcheglov 2ef2eb14d5 Fix FixesTest on Windows.
R=brianwilkerson@google.com

Change-Id: Ie56b0f876895f559f019b311be6460f95f7e37e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-30 00:19:49 +00:00
Konstantin Shcheglov a332c414f1 Switch server to using DeclarationsTracker for 'Import Library' quick fixes.
We need this to stop using UnlinkedUnit with summary2.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iaca2f19e6a168818e171f09e6eeda71a75854232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-29 16:45:32 +00:00
Brian Wilkerson 6498a3e357 Add some tests of the listTokenDetails request
Change-Id: I5dc2ae390777454128f18bef95bb00dcbce18f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-25 18:41:14 +00:00
Brian Wilkerson 523e3789e0 Add support for providing fixes in analysis options files
Change-Id: I6c9a0a0624201538a90608c2eff9cff7b6cdb4b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98870
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-10 03:39:40 +00:00
Konstantin Shcheglov 1ba59eb13d Make ERROR the default severity for StaticWarningCode. Remove _StrongModeTypeErrorProcessor.
As a preparatory step for re-landing https://dart-review.googlesource.com/c/sdk/+/91170
and making these two restored problems to warnings.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I6266632ade84743b5725c54475fe402902576c00
Reviewed-on: https://dart-review.googlesource.com/c/91420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-28 22:08:17 +00:00
Konstantin Shcheglov 6de1c478c3 Revert "Revert "Issue 34152. Verify file paths and report INVALID_FILE_PATH_FORMAT.""
This reverts commit 3f8ea3f508.

Change-Id: Ib034895f4cf29492e66dd07b7da1a99ba5e94bf6
Reviewed-on: https://dart-review.googlesource.com/c/90885
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-24 17:30:41 +00:00
Konstantin Shcheglov 3f8ea3f508 Revert "Issue 34152. Verify file paths and report INVALID_FILE_PATH_FORMAT."
This reverts commit 5dab28f27f.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Issue 34152. Verify file paths and report INVALID_FILE_PATH_FORMAT.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug: https://github.com/dart-lang/sdk/issues/34152
> Change-Id: I4a5f3634c342fbcfb3bf39c060cc658d87306312
> Reviewed-on: https://dart-review.googlesource.com/c/90840
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

Change-Id: Ib34cb3497bc2935a27622b5f5b187e1e315c8e46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/34152
Reviewed-on: https://dart-review.googlesource.com/c/90900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-24 01:01:45 +00:00
Konstantin Shcheglov 5dab28f27f Issue 34152. Verify file paths and report INVALID_FILE_PATH_FORMAT.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/34152
Change-Id: I4a5f3634c342fbcfb3bf39c060cc658d87306312
Reviewed-on: https://dart-review.googlesource.com/c/90840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-23 22:11:17 +00:00
Brian Wilkerson 47e988b781 Clean up the remaining copyright notices in analysis_server
Change-Id: Iee3110f92ab0f24312ddd1eff407d2229f895321
Reviewed-on: https://dart-review.googlesource.com/c/89101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-11 15:38:56 +00:00
Brian Wilkerson b12c125825 Export Future from dart:core in the mock sdk
Change-Id: I9b234e5834a6a6559b65b86140d60ea781ff8883
Reviewed-on: https://dart-review.googlesource.com/c/84501
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-11-15 19:32:30 +00:00
Konstantin Shcheglov c843a4fdbd Replace resourceProvider.convertPath() with just convertPath() where possible.
R=brianwilkerson@google.com

Change-Id: I80c349b0ed9092e455ca2d811f5828765361ffc7
Reviewed-on: https://dart-review.googlesource.com/c/82163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-30 23:55:26 +00:00
Konstantin Shcheglov 215e80eb0a Fix Analysis Server tests on Windows bot.
R=brianwilkerson@google.com

Change-Id: I0afc4ee40d8b1030bbcfc35bfb43a13d2db3accd
Reviewed-on: https://dart-review.googlesource.com/77266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-01 01:09:28 +00:00
Konstantin Shcheglov 4611ebaec5 Rename class when the refactoring is invoked on the class name in an instance creation.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34484
Change-Id: I9faa08e1741603dedcfe7cfacb2192d44dedc89d
Reviewed-on: https://dart-review.googlesource.com/75380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-18 19:09:37 +00:00
Brian Wilkerson 6c712f157b Add a fix to create a mixin
Change-Id: Id0f31949a5639a00e884abc61b2cfcb5bc552b44
Reviewed-on: https://dart-review.googlesource.com/75130
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-17 12:43:41 +00:00
Konstantin Shcheglov 1f52372bfa Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.

Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 13:46:45 +00:00
Konstantin Shcheglov 34e6aa8ad2 Fix mock SDK and front-end targer in analyzer.
R=brianwilkerson@google.com

Change-Id: I7d4a1948fe21720c237f6e36997d29e63dd7ab28
Reviewed-on: https://dart-review.googlesource.com/70983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-21 21:42:23 +00:00
Brian Wilkerson 978f12c17f Use void in place of Null in analysis_server
Change-Id: Ifef805cb3c0111e237a6147f71a968958d5651e5
Reviewed-on: https://dart-review.googlesource.com/69560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-13 13:16:53 +00:00
Konstantin Shcheglov fe0640e3b1 Refactor way of providing file info, set codeRange for units.
This fixes a lot of search/refactoring tests, about 200.

R=brianwilkerson@google.com

Change-Id: I6ce5f61a08b8effa73ffde3861ff68eadd1f4e04
Reviewed-on: https://dart-review.googlesource.com/69383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 20:43:54 +00:00
Konstantin Shcheglov 0aa8f2d5cb Fix for some Quick Fix tests by adding CFE generated error codes.
R=brianwilkerson@google.com

Change-Id: I2b06dc388a00aa0c8e5ab3db045b3fe8ec02ed5e
Reviewed-on: https://dart-review.googlesource.com/69283
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 18:00:46 +00:00
Konstantin Shcheglov 6f9073bb9d Wait for Analysis Server errors only while waiting for a response.
Change-Id: Ifd07293322b69cc9bab98e3698d63249b62abdb0
Reviewed-on: https://dart-review.googlesource.com/69242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 00:34:48 +00:00
Konstantin Shcheglov a1ca88f554 Resolve invocation arguments to parameters.
R=brianwilkerson@google.com

Change-Id: I76a8ea8221e0a888253af8297fb50c423699e175
Reviewed-on: https://dart-review.googlesource.com/69000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-08 21:38:59 +00:00
Brian Wilkerson 95d1ebd9f0 Fix one cause of timeouts in tests
Change-Id: I8514c7a1e89c69bbbf11882fa734903cd7c7569c
Reviewed-on: https://dart-review.googlesource.com/68430
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-06 16:08:05 +00:00
Brian Wilkerson 92ae73b6d8 Fork the remaining subclasses of AbstractAnalysisClass
Change-Id: Ie3e561a6b6f4d29510f543d616998c795fd85191
Reviewed-on: https://dart-review.googlesource.com/68120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-02 17:43:58 +00:00
Brian Wilkerson ea0468dff4 Fork more server tests to run under CFE
Change-Id: I7addca0b708e0b0dbb28e60619ea0bc2c20711af
Reviewed-on: https://dart-review.googlesource.com/68001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-02 12:39:46 +00:00
Devon Carew 6e322f794c No longer run pub list-package-dirs from the analysis server.
Change-Id: Id02bdfc25cb8827873ff607f7c4d4a3401c9a199
Reviewed-on: https://dart-review.googlesource.com/67205
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-27 23:05:41 +00:00
Konstantin Shcheglov 1d323687b3 Use selection to decide whether EXTRACT_LOCAL_VARIABLE and EXTRACT_METHOD are available.
R=brianwilkerson@google.com

Bug: https://github.com/Dart-Code/Dart-Code/issues/959
Change-Id: I64af87f26bbc26527011c34194a064a01e2d263e
Reviewed-on: https://dart-review.googlesource.com/57060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-29 20:33:06 +00:00
Konstantin Shcheglov 71ca507d3d Fix for 'Extract Widget' refactoring test on Windows.
R=brianwilkerson@google.com

Change-Id: Ibcc2e7a1d080c46168675d62ac9f0462e7d2cad0
Reviewed-on: https://dart-review.googlesource.com/51540
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-17 18:17:21 +00:00
Konstantin Shcheglov afbaf0c4a6 Add 'Extract Widget' to getAvailableRefactorings().
R=brianwilkerson@google.com

Change-Id: Ieb6faa63de75d64edd317bf8b5276f775c634e3c
Reviewed-on: https://dart-review.googlesource.com/51361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-16 20:13:08 +00:00
Konstantin Shcheglov 44dbba2b80 Use offset/length of the import prefix, or empty. Same for constructor names.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32685
Change-Id: I40b7f9c679b04725db19dad661e3a88a4a982f1c
Reviewed-on: https://dart-review.googlesource.com/48682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-28 18:19:09 +00:00
Danny Tuppeny 0c62908b40 Fix FixesTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I010b2365ffc2a3ab2a9daa6cec71067ce32a2f76
Reviewed-on: https://dart-review.googlesource.com/43663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-26 15:37:47 +00:00
Danny Tuppeny 49d68924b5 Fix OrganizeDirectivesTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: Ie033ae9fcf4088d4fb39f46c2a7a6dc7afab68b3
Reviewed-on: https://dart-review.googlesource.com/43664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-26 15:27:58 +00:00
Danny Tuppeny 40e3f9addc Convert paths for mock SDK libraries to fix tests on Windows
The other lines on this method are calling `provider.convertPath` around their paths but these ones do not, which is causing almost all analysis server tests to fail on Windows (for me - I can't explain them not
failing builds). This causes the hard-coded paths like `/lib/core/core.dart` to be fixed up to `C:\lib\core\core.dart` which is what the server is looking for (because at the other end the paths *have* been fixed up).

See #32226.

Closes #32230
https://github.com/dart-lang/sdk/pull/32230

GitOrigin-RevId: 1adeee23f8ac8efc8acf61caf5f769e4ec44c030
Change-Id: Id9bf195967db0912c6f4b67bd79d504e627b8aab
Reviewed-on: https://dart-review.googlesource.com/42300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-20 18:55:38 +00:00
Konstantin Shcheglov 95f336a667 Don't suggest imports of private libraries from other packages.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1661
Change-Id: I5e458e8815d4f8df3e2f22bdfdc21c7203cefde0
Reviewed-on: https://dart-review.googlesource.com/41620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-15 17:11:56 +00:00
Paul Berry 105b170ddb Roll package test to 0.12.29+1 and stack_trace to 1.9.0
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue().  Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.

This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.

Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-07 14:22:23 +00:00
Brian Wilkerson 1d8a5d77c1 Convert more tests to use ResourceProviderMixin
Change-Id: Ia4cce51e33c79c82a989bfda9b8303dfaa72e103
Reviewed-on: https://dart-review.googlesource.com/31880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-02 00:47:34 +00:00
Konstantin Shcheglov 223a78d7bf Listen for watch events and notify AnalysisServer.
So, AnalysisServer can serve a broadcast Stream and let EditDomain
reset a pending refactoring.

R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1465
Change-Id: I9462ad623ef261a658655a7445ee0ad9b0029a18
Reviewed-on: https://dart-review.googlesource.com/18426
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-03 15:59:45 +00:00
Devon Carew e6a34d78f1 Improve the extract method refactoring for flutter build() methods.
Bug:
Change-Id: Ic957eede0989b9cd171212425d5da0aad83bc941
Reviewed-on: https://dart-review.googlesource.com/11740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-08 01:41:41 +00:00
Brian Wilkerson b941f148a7 Remove uses of the old plugin model from the analysis server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3001413002 .
2017-08-23 07:42:13 -07:00
Konstantin Shcheglov 00d5012906 Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...instead of mixing formatting with actual changes in many CLs.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Brian Wilkerson e454986288 Add code to run more tests from test_all
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2968233002 .
2017-07-06 12:24:01 -07:00
Konstantin Shcheglov 911263f240 Remove the old index.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963773003 .
2017-06-28 13:44:05 -07:00
Steve Messick c26c2774ca This defines some postfix completion templates for use in the IntelliJ editor.
R=brianwilkerson@google.com

To use it, you'll need a version of the Dart plugin with this PR patched in:
https://github.com/JetBrains/intellij-plugins/pull/534
Review-Url: https://codereview.chromium.org/2917943002 .
2017-06-26 09:53:02 -07:00
Brian Wilkerson ec8505fc79 Fix hints and clean-up obsolete comment syntax (TBR)
Review-Url: https://codereview.chromium.org/2952233002 .
2017-06-22 10:59:26 -07:00
Brian Wilkerson a0d7d64f0b Convert more tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2936123002 .
2017-06-13 19:38:59 -07:00
Brian Wilkerson 67ff4d4c47 Convert more tests to the new driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2933943002 .
2017-06-12 14:10:14 -07:00
Brian Wilkerson 7e11a13cf5 Add requestTime to responses
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2890163004 .
2017-05-18 10:32:47 -07:00
Brian Wilkerson 7d26ff6d4f Remove some more library directives
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Brian Wilkerson fb982f5476 Make server use the common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -07:00
Brian Wilkerson 27f9e5e4ce Reverse the sense of the flag to make it easier to find test that need to be converted
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884593003 .
2017-05-15 08:40:40 -07:00
Brian Wilkerson 3085734ef6 Generate common types into a separate library
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2880443006 .
2017-05-13 08:12:14 -07:00