Commit Graph

111 Commits

Author SHA1 Message Date
Konstantin Shcheglov d0b28d2040 Fix analysis_server tests on Windows.
R=brianwilkerson@google.com

Change-Id: I9e66a81a8aab249ce4174085e2432e4ed53d943d
Reviewed-on: https://dart-review.googlesource.com/58142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-02 21:40:16 +00:00
Konstantin Shcheglov 184df3aee0 Make AnalysisServer.getAnalysisResult() sync to avoid changing behavior between Dart1 and Dart2.
R=brianwilkerson@google.com

Change-Id: I35e01907a6e8286b5ffd48a3b5ac6fcaf23034b3
Reviewed-on: https://dart-review.googlesource.com/58000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 21:17:33 +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 a412f24e41 Add tests for highlighting implicit instance creation.
And in general run analysis server tests with `previewDart2 = true`.

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

Change-Id: I063d667e96a46d60d3b10aa1a87b4c7a7d2252e5
Reviewed-on: https://dart-review.googlesource.com/42101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-16 20:52:01 +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
Brian Wilkerson 98e0c26a89 Convert several test classes to use ResourceProviderMixin
Change-Id: I1c85c6f29ae74cca0b594fc1f9ddae098b815e72
Reviewed-on: https://dart-review.googlesource.com/31860
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-01 16:21:02 +00:00
Brian Wilkerson e4d44b2dcd Remove more references to the old plugin system
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004523003 .
2017-08-23 09:25:07 -07: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
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
Brian Wilkerson 9ddb832e10 Generate constants in server as we do in plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2960073002 .
2017-06-28 08:21:33 -07:00
Brian Wilkerson e0216fef7f Remove ability to disable new analysis driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2937323003 .
2017-06-19 08:13:14 -07:00
Brian Wilkerson 4da8380881 Convert more tests to use the new driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2939803002 .
2017-06-13 12:04:25 -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 e6c8092cea Enable analysis driver in tests where possible
R=danrubel@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2868353002 .
2017-05-10 09:13:25 -07:00
Brian Wilkerson e55812a3f2 Unify the server and plugin versions of the generators
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2844273003 .
2017-04-28 07:46:29 -07:00
Brian Wilkerson 5695e95902 Add support for three more plugin requests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2834993002 .
2017-04-22 09:02:30 -07:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Brian Wilkerson e17e359faa Create summary files in MockSdk classes
Review URL: https://codereview.chromium.org/2542853003 .
2016-12-02 07:32:39 -08:00
Konstantin Shcheglov 9f1ca4a119 Make AnalysisSErver APIs to access unit/node/element asynchronous.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2526473003 .
2016-11-22 10:46:06 -08:00
Konstantin Shcheglov ab0a8e775f Use single unit/node/element.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2525693002 .
2016-11-22 09:13:31 -08:00
Brian Wilkerson 3155b1e08c Remove unused method and field from DartSdkManager
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2415413003 .
2016-10-14 09:53:44 -07:00
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

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

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

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

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Brian Wilkerson 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Brian Wilkerson 2d9e690e6c Fix newly introduced errors and warnings
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2357553003 .
2016-09-21 08:01:04 -07:00
Brian Wilkerson c369a8449e More clean-up in server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2350143004 .
2016-09-20 08:39:43 -07:00
Brian Wilkerson ab9ba20c04 Fix recently introduced strong-mode errors
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Brian Wilkerson 9c5213a077 Generalize DartSdkManager to support embedder SDKs
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2107793002 .
2016-06-28 13:48:57 -07:00
Brian Wilkerson 0d743fbacf Start making server strong mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1842063003 .
2016-03-31 08:27:05 -07:00
Konstantin Shcheglov c675ba270f Pass AnalysisOptions into SdkCreator, disable changing afterwards.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1830703002 .
2016-03-23 13:11:49 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Konstantin Shcheglov c9e82c7e67 Fill the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1749333004 .
2016-03-02 14:00:17 -08:00
Brian Wilkerson bdd0d637fe We need to perform analysis differently based on some option settings (such as strong mode), but there is currently a single SDK that is shared across all contexts no matter which option values are being used. This causes us to inconsistently analyze different portions of the SDK depending on which outer context was the first to request the analysis.
This is at least a first step toward solving this problem by allowing multiple SDKs to be created, one for each unique set of options.

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

Review URL: https://codereview.chromium.org/1686613002 .
2016-02-09 11:05:34 -08:00
Konstantin Shcheglov e48f962af1 Validate that root paths are absolute and normalized.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25203

Review URL: https://codereview.chromium.org/1511833004 .
2015-12-09 15:05:22 -08:00
pq 43f027fc05 Analysis request getReachableSources (#24893).
Implements a new request to get reachable sources.

This solves a specific issue for flutter (e.g., inferring execution type by checking the transitive closure of reachabe sources for `dart:flutter`) but can be more generallly useful for other client-side smarts (e.g., "is this a web entry point?" or "is this a test?").

More context here: https://github.com/dart-lang/sdk/issues/24893

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

Review URL: https://codereview.chromium.org/1491013002 .
2015-12-02 13:26:35 -08:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
Paul Berry b39928e01d Ignore non-existent analysis roots.
Fixes #24242.

R=danrubel@google.com

Review URL: https://codereview.chromium.org//1316753003 .
2015-09-08 05:36:30 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
Konstantin Shcheglov 811877df42 Invalidate resolution of analysisOptions/sourceFactory changes.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1167483004
2015-06-05 14:09:12 -07:00
Brian Wilkerson 06a3fd1984 Fix more tests for the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1159623013
2015-06-02 09:06:53 -07:00
Brian Wilkerson ad52c9eab9 Add support for specifying files needing analysis
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1152013002
2015-05-21 14:34:04 -07:00
scheglov@google.com 9efb25fa50 Use package:test_reflective_loader instead of reflective_tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1101003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45365 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 20:54:29 +00:00
scheglov@google.com 028f13011e Issue 23027. Try to make priority files analyzable.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23027

Review URL: https://codereview.chromium.org//1044463005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44786 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 19:50:10 +00:00
scheglov@google.com 60d4a29500 Fix for subscribing for notifications for files in packages.
Unfortunately this fix makes the server about 20% slower.

This is mostly because of the check in scheduleNotificationOperations(),
as required to fix dartbug.com/22210. I think it is much cheaper to send
duplicate notifications, like outline or navigation, than to check if
they should not be sent.

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

Review URL: https://codereview.chromium.org//987663002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44305 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 22:55:20 +00:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//969113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
scheglov@google.com 7db81a77c0 Make AnalysisServer.onAnalysisComplete a Future and wait for it before refactoring.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//875163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43158 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 22:31:51 +00:00