Commit Graph

100 Commits

Author SHA1 Message Date
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
Brian Wilkerson c6c7580c92 Add error detection and reporting for errors related to plugins
Change-Id: If17e88b64022fe71c992c5867c80263c0e6b953b
Reviewed-on: https://dart-review.googlesource.com/18781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-05 19:21:07 +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 b9cb5aea84 If Icon or Text creation does not have the required argument, ignore this.
R=brianwilkerson@google.com, devoncarew@google.com

Bug:
Change-Id: I953448c9fe4fe4693c298ea0f0842651f7900cf2
Reviewed-on: https://dart-review.googlesource.com/17300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-30 21:53:27 +00:00
Konstantin Shcheglov 6b1658906e Support for Flutter is not limited to code correction. Move to utilities.
R=brianwilkerson@google.com

Bug:
Change-Id: Idaa90946710fcbec2a35a91eb35b5ead68cf4170
Reviewed-on: https://dart-review.googlesource.com/16621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 19:11:38 +00:00
Konstantin Shcheglov c2f1af6378 First steps for computing Flutter outlines.
R=brianwilkerson@google.com, devoncarew@google.com

Bug:
Change-Id: Ib8151df40439a28da536d467a5c0e7354fcfba51
Reviewed-on: https://dart-review.googlesource.com/16338
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-25 17:00:56 +00:00
Konstantin Shcheglov 1f41c3778c Extract more unit-test like OutlineComputerTest.
R=brianwilkerson@google.com

Bug:
Change-Id: Ibdadbd656d6cd85cd01a6a68d425dbd20a0b07ea
Reviewed-on: https://dart-review.googlesource.com/16420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-25 04:27:39 +00:00
Devon Carew 6a19e794b1 Don't create single line closing labels.
Bug:
Change-Id: I1ced51a7b5e5aee6db03a77a788c0eeaef101469
Reviewed-on: https://dart-review.googlesource.com/10820
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-05 05:23:20 +00:00
Konstantin Shcheglov 8ce5c45fff Fix for copying constructor return types.
R=brianwilkerson@google.com

Bug:
Change-Id: Iaa1039b85549fb2daa3d90ea11f4756363c6c358
Reviewed-on: https://dart-review.googlesource.com/10163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-02 21:37:47 +00:00
Devon Carew fd4528fffb Make closing labels slightly less noisy.
Bug:
Change-Id: If916adb1cceab14c9260f288bf59878c6955f3ce
Reviewed-on: https://dart-review.googlesource.com/9000
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-27 18:52:25 +00:00
Brian Wilkerson 8db9995c65 Fix an exception when a package is not defined
Change-Id: Id2469b4e0c4aaa8acb63c0186e7b53ec4acea95d
Reviewed-on: https://dart-review.googlesource.com/5885
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-09-14 19:42:50 +00:00
Devon Carew 2b3b0272c4 Switch to using specific throws calls instead of general throwsA() calls.
Bug:
Change-Id: Id604dca1b8c3060c1d12c9ed0b1493771d2eb0d6
Reviewed-on: https://dart-review.googlesource.com/5883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2017-09-14 18:04:44 +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
Brian Wilkerson 4aeedec64e Remove the auto-discovery of plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3003663002 .
2017-08-22 09:04:23 -07:00
Brian Wilkerson 35f6d5da1b Correctly handle adding imports when pasting into part files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/3001733002 .
2017-08-16 07:43:36 -07:00
Brian Wilkerson eaf779ba1e Fix insertion of imports when there are no existing directives (issue 30430)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3002643002 .
2017-08-14 13:32:57 -07:00
Danny Tuppeny 0647d9a228 Improvements to analysis server closing labels (#30411)
* Tweak comment that was based on integration test verison.

See #30285

* Include additional 1/2-line spans that end on same lines as >2 line spans.

See #30285

* Add tests to ensure no unwanted closing labels from multiline expressions.

See #30285

* Don't show closing labels for code inside interpolated strings.

See #30285

* Remove unwanted @soloTest.

See #30285

* Make casing of test names consistent.

See #30285

* Add a constructor and make fields final.

See #30285

* Use putIfAbsent for adding to map.

See #30285

* Shorten closing labels constructor.

See #30285

* Run "Sort members" on closing labels files.

See #30285

* Remove unnecessary type annotations.

See #30285
2017-08-11 11:04:34 -07:00
Devon Carew c8f8f8e7cc Ignore two unused element warnings in pkg/analysis_server.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2994113002 .
2017-08-10 11:36:12 -07:00
Danny Tuppeny 619f2995ab Implement analysis server closing labels (work-in-progress) (#30372)
* Add empty closing labels computer/visitor and tests.

See #30285

* Add initial implementation and test for closing labels.

See #30285

* Add various tests for analyzer closing labels.

See #30285

* Fail tests if errors occur.

Without this the notifications will never come through and the test will time out. This causes them to fail right away on errors.

See #30285

* Add test and fix for crash that occurred during testing.

See #30285

* Remove unnecessary abs().

See #30285

* Remove question that has been answered (yes).

See #30285

* Remove unnecessary .argumentList on spansManyLines check.

See #30285

* Add test for prefixed import and constructor names.

The behaviour seems like what we want, though need to confirm if this is the best way to do it.

See #30285

* Add additional prefixed tests and another TODO.

See #30285

* Fix method invocations to show full target/name.

See #30285

* Fix constructor invocations to not use toString().

See #30285

* Convert most closing label tests to unit tests.

See #30285
2017-08-09 14:13:47 -07: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 4c635b7b85 Initial support for an explicit plugin list
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988343002 .
2017-08-02 11:30:57 -07:00
Brian Wilkerson ae69313731 Initial implementation of the import-aware copy support
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988183002 .
2017-08-01 08:32:12 -07:00
Brian Wilkerson 45d0b24283 Add a test for import-aware paste
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2992133002 .
2017-08-01 08:20:30 -07:00
Brian Wilkerson 9591a9449f Partial support for intelligent paste operation
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2986073002 .
2017-07-27 13:55:59 -07:00
Brian Wilkerson c618032a69 Remove the uri from the ImportedElements object in the experimental spec API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2991893002 .
2017-07-27 12:52:38 -07:00
Brian Wilkerson 8bbf373a5e Remove the analysus.reanalyze request from the plugin API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988743002 .
2017-07-25 12:10:52 -07:00
Brian Wilkerson 0f9707073d Add support for creating a .packages file when the plugin is in a Bazel workspace
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988673002 .
2017-07-24 10:00:05 -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 cc5ccf5dcf Add unit tests for copy/paste support
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965243002 .
2017-07-06 09:54:42 -07:00
Brian Wilkerson 66986042af Add support for running pub for plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2949893002 .
2017-06-26 09:21:11 -07:00
Brian Wilkerson 5946ce552f Add AnalysisSession to analyzer
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2954153002 .
2017-06-26 09:16:11 -07:00
Devon Carew de5cf42579 Fix an issue calculating analysis server cpu usage.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2959643002 .
2017-06-25 18:59:41 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Brian Wilkerson 6e89075952 Disable finding plugin locations in the pubspec
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2947153002 .
2017-06-21 09:30:32 -07:00
Brian Wilkerson 5582824e3c Rename the plugin location key and directory name
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2952583003 .
2017-06-20 11:06:39 -07:00
Brian Wilkerson 24996fbfe7 Add support to pass the location of the analysis options file to plugins
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Devon Carew 0d25ac11ed Skip the ProcessProfiler.getProcessUsage test.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2927863002 .
2017-06-07 12:20:03 -07:00
Devon Carew 79c2668d2b add memory usage to the diagnostics page
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2927783002 .
2017-06-07 11:28:34 -07:00
Brian Wilkerson a8dc041543 Capture the request time for performance data and support forced shutdown
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2893803004 .
2017-05-19 08:49:47 -07:00
Brian Wilkerson c1a7070770 Add the ability to whitelist plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2897653002 .
2017-05-19 08:48:32 -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 daffcecc11 Pass the sdk path to plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2885993004 .
2017-05-17 08:19:49 -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 cb258a952c Remove unused contentHash from results
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2885203002 .
2017-05-16 14:08:11 -07:00
Brian Wilkerson a03958bfc9 More clean-up after getting common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2880393002 .
2017-05-15 13:01:57 -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
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
Brian Wilkerson 3b2c3ae5b2 Add support for built-in plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2874803003 .
2017-05-10 13:31:20 -07:00