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
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
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
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
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
2a4772a537
Remove unnecessary tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2868233003 .
2017-05-10 09:15:36 -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
863bd921e1
Remove the non-driver versions of several tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2863593004 .
2017-05-05 13:46:03 -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
Jacob Richman
a993294503
Format all analyzer packages
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2753923003 .
2017-03-16 16:11:43 -07:00
Konstantin Shcheglov
b5ded5fb3c
Add unit test for 'search.findMemberReferences' with the driver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2746123003 .
2017-03-13 15:55:17 -07:00
Konstantin Shcheglov
5cbd824762
Fix for search references when the element is null.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2526363002 .
2016-11-28 08:51:40 -08:00
Konstantin Shcheglov
9bc4c73e2d
Stop returning declaration matches from search for references.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2518183003 .
2016-11-22 12:32:51 -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
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
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
Konstantin Shcheglov
0522cad42a
Convert to async/await parts that cause strong mode warnings.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2233633003 .
2016-08-10 10:28:34 -07:00
Konstantin Shcheglov
dd18f93154
Issue 26926. Don't search hierarchy for static class members.
...
R=pquitslund@google.com
BUG= https://github.com/dart-lang/sdk/issues/26926
Review URL: https://codereview.chromium.org/2176173004 .
2016-07-25 11:36:52 -07:00
Devon Carew
c52843e42d
Validate the regex used in search.findTopLevelDeclarations.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2160723002 .
2016-07-18 12:13:12 -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
222a11c290
Index unqualified unresolved used names.
...
This fixes one of the previously disabled tests.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1788673004 .
2016-03-11 15:10:43 -08:00
Konstantin Shcheglov
76f4578af8
Start using the new index in Analysis Server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1786013004 .
2016-03-11 14:02:37 -08:00
Brian Slesinsky
ae009e0870
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
Review URL: https://codereview.chromium.org/1759333002 .
2016-03-09 12:59:46 -08:00
Konstantin Shcheglov
9f451cb0dc
Issue 25538. Fix for type hierarchy and private class members.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538
Review URL: https://codereview.chromium.org/1615093002 .
2016-01-21 10:56:05 -08:00
Konstantin Shcheglov
a19b2985dc
Fix for the case when a class appears twice in a type hierarchy.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1406403009 .
2015-11-06 11:14:30 -08:00
Konstantin Shcheglov
c7907e7800
Support for searching files by import/export/part URIs and library identifiers.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1417483006 .
2015-10-20 08:52:02 -07:00
Konstantin Shcheglov
9913f33522
Stop looking for overrides once the pivot element reached.
...
See also https://github.com/dart-lang/sdk/issues/21804 for the original motivation.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1396053003 .
2015-10-13 08:24:16 -07: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
Konstantin Shcheglov
13d5a4744d
Support for 'superOnly' in 'search.getTypeHierarchy'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1322323005 .
2015-09-03 14:29:48 -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
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
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
944fd2ccdd
Issue 22575. Fix for type hierarchy from FieldElement.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22575
Review URL: https://codereview.chromium.org//962743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44077 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 22:22:31 +00:00
scheglov@google.com
7c257183de
Issue 21804. Type hierarchy should show overrides in mixins.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21804
Review URL: https://codereview.chromium.org//956023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44033 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 22:53:19 +00:00
scheglov@google.com
b36efe9640
Field references in field format parameter declarations and initializers mean writing.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//949623005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43971 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 18:45:30 +00:00
scheglov@google.com
946d56198e
Fix for searching constructor references.
...
Currently we record constructor declarations and SearchEngine returns them as "references".
But it is not quite a reference, and it is used only as a way to get name range.
With this change to ConstructorElement we don't need to have these artificial references.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//946023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43932 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 22:10:30 +00:00
scheglov@google.com
55a3255070
Return RequestErrorCode.NO_INDEX_GENERATED for search/refactoring requests.
...
Also remove passing a SearchEngine instance into Quick assists/fixes - they don't use it.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//923103004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43819 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 20:01:45 +00:00
scheglov@google.com
51842b06f2
Fix type hierarchy when there is no element.
...
This one was caught by an integration test.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//892913004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43445 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 23:01:51 +00:00
scheglov@google.com
1a94fa3a6a
Wait for analysis in search domain. Rewrite with async/await.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//894323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43435 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 21:59:31 +00:00
scheglov@google.com
a38a503d86
Replace @ReflectiveTestCase() with @reflectiveTest.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//849863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
paulberry@google.com
c35a4acd9c
Fix order of operations dependencies in element_references_test
...
It's not safe for a single test to have two overlapping calls to
findElementReferences() because fields in the test class are used to
hold the search results and to keep track of whether more results are
pending.
Fixes a bogus test failure that arose after the relative ordering of
futures and microtasks was changed.
BUG=dartbug.com/22014
R=scheglov@google.com
Review URL: https://codereview.chromium.org//842803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42738 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 16:36:42 +00:00
scheglov@google.com
b8da9bc651
Format and sort analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
scheglov@google.com
df6233ae4a
Use Element's source paths instead of URIs as a key in the index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//703963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41530 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 21:02:37 +00:00
scheglov@google.com
07cf72a3ec
Improve import prefix search results UI.
...
1. Bug fix for search on an import directive without a prefix.
2. Pretend that import prefixes are children on libraries' compilation units.
3. Icon for import prefix elements in Editor.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//640333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41024 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 20:30:49 +00:00
scheglov@google.com
e9e0694e2f
Remove references to Engine classes from protocol.dart
...
R=brianwilkerson@google.com , paulberry@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//628293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40948 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 00:24:48 +00:00