Commit Graph

115 Commits

Author SHA1 Message Date
Brian Wilkerson 83aa463fac Enable a few more server tests under CFE
Change-Id: I5f0bd750d3da7658f836e45f02da5ef157e752ff
Reviewed-on: https://dart-review.googlesource.com/68960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-08 17:13:28 +00:00
Brian Wilkerson 6137511849 Add more CFE tests for server
Change-Id: I51b36a988c83e2f20f3e76d01fdb09644c2c2ce2
Reviewed-on: https://dart-review.googlesource.com/68760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-08 15:01:32 +00:00
Konstantin Shcheglov 80e08e0913 Use 'useCFE' flag to turn on CFE in AnalysisDriver.
R=brianwilkerson@google.com

Change-Id: If0aa7d10bc46f1dd408d0be8128fc25538758359
Reviewed-on: https://dart-review.googlesource.com/68720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 16:12:47 +00:00
Brian Wilkerson bc8a8386af Fix tests that reference the flutter package
Change-Id: Idd1949db259d747abb063328901f42be29ba57b2
Reviewed-on: https://dart-review.googlesource.com/68581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 15:48:37 +00:00
Brian Wilkerson b0de4d8ac0 Add support for and a few additional CFE-based tests
Change-Id: I8e52f41cc54341c4321e688ae46a6392e69f98ab
Reviewed-on: https://dart-review.googlesource.com/68500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-06 21:04:02 +00:00
Devon Carew 2dd33c2a6c Have the package:analyzer strong mode option hard coded to on. Delete several spec mode only tests.
Change-Id: I5dffec68d9845fe75936d55100c03306b6eda363
Reviewed-on: https://dart-review.googlesource.com/64060
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-10 05:30:10 +00:00
Paul Berry 993b4caf0e Make the change to ContextRoot non-breaking.
In 4cf51e6c1a, a new argument was added
to the ContextRoot constructor, changing its signature in a breaking
way.

In theory this should not have broken other packages, because
ContextRoot is declared inside analyzer/lib/src.  But it turns out
that two packages are known to import from analyzer/lib/src and
construct ContextRoot: angular_analyzer_plugin and
built_value_generator.  To avoid breaking these packages, we need to
add the new constructor parameter as an optional (named) parameter.

Some time after after angular_analyzer_plugin and
built_value_generator have been updated, I'll send a later CL to mark
the named parameter as @required.

Change-Id: I5be063dd47a3dfefba08cb444687b91bf2ba3625
Reviewed-on: https://dart-review.googlesource.com/56603
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-24 21:56:25 +00:00
Konstantin Shcheglov 4cf51e6c1a Give (the old) ContextRoot path.Context to work with paths.
R=brianwilkerson@google.com

Change-Id: I7699bb50ea4b6239c61c69de5e8e2ceeed64ea64
Reviewed-on: https://dart-review.googlesource.com/56024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-21 22:04:24 +00:00
Konstantin Shcheglov 76a30dd594 Initial implementation of 'execution.getSuggestions'.
Only local variables, no tests for multiple blocks, or parameters.
No support for classes yet.

No support for expressions or runtime variable types.

R=brianwilkerson@google.com

Change-Id: I9ec5c40e407cda48be408e4e4882d97349413b9c
Reviewed-on: https://dart-review.googlesource.com/55762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-17 20:25:04 +00:00
Konstantin Shcheglov f62302b8ee Make extracted widgets follow Flutter style - const constructor and @required named parameters.
R=brianwilkerson@google.com, pquitslund@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2166
Change-Id: I28f548c8e814ac5b9585dd46fbb9a8f84f70f418
Reviewed-on: https://dart-review.googlesource.com/54066
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-07 20:59:04 +00:00
Konstantin Shcheglov b7a63c8d52 Use @isTest and @isTestGroup to understand executable element as a test/group.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2055
Change-Id: I7c8e7639d111eca63df0780ebdec182573493047
Reviewed-on: https://dart-review.googlesource.com/53690
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-04 17:09:06 +00:00
Brian Wilkerson 7054d92a02 Remove some classes from the analyzer public API
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-24 15:28:15 +00:00
Brian Wilkerson 5460ddbab5 Move three more libraries out of the public API
Change-Id: I8e6aeaea35c739fb26e22ffcfc30a343ebbb5424
Reviewed-on: https://dart-review.googlesource.com/51363
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-16 22:15:28 +00:00
Brian Wilkerson a0295ffa0e Convert analysis_server tests to pass under preview-dart-2
Change-Id: Ibfdc53c7b1252166d44a0bda077e464a8c474572
Reviewed-on: https://dart-review.googlesource.com/46574
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-15 18:49:24 +00:00
Konstantin Shcheglov 0ce1a92d98 Suggest constructors for implicit creation in previewDart2.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/998
Change-Id: I43270f47fb43402d1a9e0f7d9814494ffd83bb5e
Reviewed-on: https://dart-review.googlesource.com/43080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-22 18:03:12 +00:00
Danny Tuppeny 20578644c0 Fix all remaining broken FixProcessorTest tests on Windows
See #32226.

Change-Id: Idc80d0ac7441e1db8c0213093b9b79d4b3e70315
Reviewed-on: https://dart-review.googlesource.com/42700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 17:19:19 +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
Konstantin Shcheglov 0ff7348c7b Switch tests to use Flutter package mock that more closely resembles the actual package structure.
So, we can test that "Wrap with Center" works when we ask for Center
in package:flutter/widgets.dart

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

Change-Id: I3446f5cf97c1d6f2e68686de6561d894b5e95620
Reviewed-on: https://dart-review.googlesource.com/38162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-01 22:12:06 +00:00
Brian Wilkerson 8e7781ea9e Convert remaining tests to use ResourceProviderMixin
Change-Id: I7bd0941a415737bd3c9c55e9650f2a982937f777
Reviewed-on: https://dart-review.googlesource.com/31961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-01-02 16:33:14 +00:00
Jens Johansen 22d0696d91 [CFE] Move front-end API under src/
This CL deprecates the front-end API and moves it into src/api_prototype.

For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)

Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 08:42:16 +00:00
Konstantin Shcheglov 5ea30b4e3d Rename performace_logger.dart to performance_logger.dart
R=paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov 1b4239d2e4 Export ByteStore and its implementations from front_end.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-09-07 19:23:21 +00:00
Paul Berry 89c910b9c1 Move byte_store.dart and file_byte_store.dart to their own subdirectory.
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.

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

Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Brian Wilkerson 9a6b134d33 Improve name generation for indexed expressions
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2990793002 .
2017-07-27 07:58:34 -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 4337a3aeee Cleanup some unused code in some of the tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2942433002 .
2017-06-13 14:01:17 -07:00
Brian Wilkerson aa33d71071 Another attempt to fix the windows tests
Review-Url: https://codereview.chromium.org/2927873002 .
2017-06-07 12:35:56 -07:00
Konstantin Shcheglov ab9ee72a34 Switch server tests to strong mode.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2903523003 .
2017-05-23 14:58:53 -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
Konstantin Shcheglov a4fd5d814f Extract PerformanceLogger from AnalysisDriver.
I also added the runAsync().

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

Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Konstantin Shcheglov bd1ee32543 Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
We are going to reuse ByteStore in front_end, also for incremental
compilation.

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

Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
Brian Wilkerson 6b8a56cd7f Switch the default from non-driver to driver in several tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2864813002 .
2017-05-07 08:34:16 -07:00
Brian Wilkerson 0b59d3f650 Convert some tests to use the driver and prepare for others to be converted
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2859993004 .
2017-05-05 13:20:38 -07:00
Brian Wilkerson dd49e79f74 Add context information to driver and add hooks for plugin management
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2795743002 .
2017-04-03 10:13:45 -07:00
pq d826b1f931 Default arg support continued (flutter-intellij#553).
Default arg support for:
  * inherited refs
  * imported refs
  * type members
  * local constructors

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

See: https://github.com/flutter/flutter-intellij/issues/553
Review-Url: https://codereview.chromium.org/2728653004 .
2017-03-01 15:00:47 -08:00
Konstantin Shcheglov af539081cd When addSource() in tests, call both addFile() and changeFile().
This fixes the two failing tests.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2681733007 .
2017-02-09 08:50:57 -08:00
Konstantin Shcheglov 678021c7cf Fix SDK partitions leak in tests.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2668103002 .
2017-01-31 13:04:13 -08:00
Konstantin Shcheglov fcd5f16d10 Stop using SDK summary bundle. Analyze dart:xxx as any other libraries.
Unfortunately this makes runnings tests about 30% slower :-(

I suspect that's because we have to build unlinked and linked summaries
for SDK libraries again and again for every tiny test.

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

Review-Url: https://codereview.chromium.org/2653683004 .
2017-01-24 18:32:26 -08:00
Konstantin Shcheglov 5f6ea67c1e Make Analysis Server tests use MockSdk again.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2650803005 .
2017-01-24 13:49:48 -08:00
Konstantin Shcheglov 8d326e9a14 Report StateError if the DartSDK for an AnalysisDriver does not have summary.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2639743002 .
2017-01-17 20:46:00 -08:00
Konstantin Shcheglov d5fc0cda3b Fix Quick Fix tests that used AnalysisContext.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615303002 .
2017-01-06 14:31:38 -08:00
Konstantin Shcheglov d2f48ccf58 Make subclasses of AbstractContextTest asynchronous.
As a preliminary step before duplicating them for the new analysis driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614033003 .
2017-01-05 14:21:29 -08:00
Konstantin Shcheglov 4f03cccf06 Fix part related completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2616493004 .
2017-01-04 15:06:10 -08:00
Konstantin Shcheglov 1e43b4f270 Replace using MockSdk with FolderBasedDartSdk + summaries in AbstractContextTest(s).
It has some performance penalty (about 2-3 seconds in 35 seconds total).

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

Review-Url: https://codereview.chromium.org/2610823004 .
2017-01-04 14:39:24 -08:00
Konstantin Shcheglov 63d1c18f41 Add completion tests for the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572203002 .
2016-12-14 12:05:20 -08:00
Brian Wilkerson cbd7a2908e Fixes for tests on windows
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2420413004 .
2016-10-17 09:39:25 -07:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Brian Wilkerson ea3ba0e31f Remove deprecated code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08:00