Commit Graph

66 Commits

Author SHA1 Message Date
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Danny Tuppeny bacd31dcdf [analyzer] Flatten capabilities into a wrapper to simplify checking capabilities
Change-Id: I184e8ce3379bbb6ae4d8e81d80979510a8f1f393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-04 19:51:09 +00:00
Sam Rawlins b948c7ee26 analysis_server: Remove unnecessary imports
Change-Id: I153b993e5d7721ad71818f3bd29d5117a76f3f08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-10 18:24:36 +00:00
Brian Wilkerson 8f05ecae6e In edit benchmark, wait for initial analysis before editing the file
Change-Id: I2dbf5df9fa87d5e7f58260bd311673d2c2b53bd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183703
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-08 21:23:44 +00:00
Danny Tuppeny e8dce3a6f0 [analyzer] Support --verbose for LSP benchmarks
Change-Id: Ibad5b798e7f7a069bd5e1ce9758cfbbcaa8e3001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182511
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-03 19:34:57 +00:00
Danny Tuppeny 12c0ca85df [analyzer] Set file as priority in edit benchmarks
Change-Id: I140754d76527cef59d47f989075260c1160c0504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182507
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-03 19:33:47 +00:00
Danny Tuppeny 74d8cc9636 Extend analysis server benchmarks to run for LSP too
Change-Id: Ib6522b8faaa5be272d8f97043a7aa1c345ea182c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-02 22:09:54 +00:00
Mike Fairhurst 1134a0f17c [analysis_server] Remove unused dart:async imports
Change-Id: I764ee78cb9e31bdb3abaa36ca4754e1fed180311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161447
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:29:52 +00:00
Ben Konyi 444490d640 Reland "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
This is a reland of 604a366065

Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
> 
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
> 
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
> 
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Change-Id: I917d3056322d74766bdf376a3e28871ad5b66cfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147980
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-05-13 19:58:56 +00:00
David Morgan 964f966c0c Revert "[ VM / DartDev ] Run all debugging sessions via 'dart run'"
This reverts commit 604a366065.

Reason for revert: Breaks google3, see b/156414355

Original change's description:
> [ VM / DartDev ] Run all debugging sessions via 'dart run'
> 
> Prior to this change, running `dart --observe foo.dart` would result in
> the DartDev flow being bypassed. While `dart foo.dart` will continue to
> bypass DartDev and be run directly, running either `dart --observe
> <vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
> will result in the command being implicitly converted to `dart run
> --observe <vm-flags> foo.dart`. This is required for all standalone VM
> instances to run against DDS instead of the VM service directly.
> 
> As usual, the DartDev flow can always be bypassed by providing the
> --disable-dart-dev flag.
> 
> Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I688a3779e7ccaf85a28dc4d6f5ccf23596109519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147900
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-05-13 07:13:35 +00:00
Ben Konyi 604a366065 [ VM / DartDev ] Run all debugging sessions via 'dart run'
Prior to this change, running `dart --observe foo.dart` would result in
the DartDev flow being bypassed. While `dart foo.dart` will continue to
bypass DartDev and be run directly, running either `dart --observe
<vm-flags> foo.dart` or `dart --enable-vm-service <vm-flags> foo.dart`
will result in the command being implicitly converted to `dart run
--observe <vm-flags> foo.dart`. This is required for all standalone VM
instances to run against DDS instead of the VM service directly.

As usual, the DartDev flow can always be bypassed by providing the
--disable-dart-dev flag.

Change-Id: I211cd1ec4b1ec0e75ae0a568a66f1a0fc7b3852f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147342
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-12 19:53:11 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Brian Wilkerson 486467c02d Bulk sort of a subset of the files in analysis_server
Change-Id: Id811d37ad565c6f3c0ed508ae2b42e22469cbd3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139830
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 19:13:14 +00:00
Brian Wilkerson e75c9192a1 Start converting dartdoc style in analysis_server
Change-Id: I013659a0f34dafce4c091dc534e2ab8ef0469217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 15:00:03 +00:00
Brian Wilkerson 5584c96fde Enable prefer_single_quotes in analysis_server
All of the changes except in the analysis options file are from dartfix.

Change-Id: Icd9bf02ad07f71d1fc365979c7dfe18a792dc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 17:52:52 +00:00
Brian Wilkerson 91d6e1a0a7 Enable annotate_overrides in several packages
Other than analysis_server/test/analysis/notification_overrides_test.dart,
which had a naming conflict, all of the changes were made using dartfix.

Change-Id: I911dd75dcdee00420caa48724125e86d47c8857d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-01 21:31:40 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Devon Carew ec28bf1fd1 [analyzer] refactor the vm status section in the analyzer diagnostics page
Change-Id: I67213237d8b867ef5ac3655b51f58ee2ea5a6485
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-12-02 19:20:18 +00:00
Alexander Markov 136aee0655 [analysis_server] Fix flaky hanging in analysis server benchmark
This hanging was exposed when running analysis server benchmark on the VM
with bytecode due to different timings.

Benchmark was sending a request to analysis server and then subscribing to
a broadcast stream, which was populated from the output of analysis server
process.

Before the fix it was possible that benchmark wouldn't see
CompletionResultsParams which was posted to test.onCompletionResults
between sending a request and subscribing to test.onCompletionResults.
As a result, benchmark was waiting on a Future for a skipped
CompletionResultsParams indefinitely.

Change-Id: I6f282b504437d687ccac3e96fada201bf25dbd10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111484
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-01 16:30:13 +00:00
pq 52abcd3dd2 apply prefer_equal_for_default_values
Change-Id: I9b6fd3ee18ec834a5db3d0d25455b6db9ea4fbe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-07-10 19:31:40 +00:00
Konstantin Shcheglov 4324d46080 Use an available socket port for memory benchmark.
R=devoncarew@google.com

Change-Id: I96472010b6bfa01e0ae2254f105d8e71bb7e86d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105683
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-12 16:18:14 +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 73ea4b1a82 Remove dead code from the analysis_server tests
Change-Id: I91f943baa191e27b7e647d78e5424fcb3a5cc990
Reviewed-on: https://dart-review.googlesource.com/c/88165
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-02 14:23:09 +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
Devon Carew a517d19788 Change how we calculate memory usage for the analysis server benchmarks.
Change-Id: I22ce228bd6bbd9fface6ebc19b4bb80d601b9893
Reviewed-on: https://dart-review.googlesource.com/70100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-15 02:04:42 +00:00
Devon Carew fe3bba8b03 Switch integration tests to use a snapshot for the analysis server.
Bug: https://github.com/dart-lang/sdk/issues/33189
Change-Id: I27ac08545c36c1cc1c7718b945f298b6286731b9
Reviewed-on: https://dart-review.googlesource.com/57300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-05-30 17:29:55 +00:00
Vyacheslav Egorov f2b137343c Do not run analyzer benchmarks in checked mode.
Change-Id: Ib591a981d29ae671c6c6ea3b4f1e64e098607a5a
Reviewed-on: https://dart-review.googlesource.com/54230
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-08 19:44:37 +00:00
Devon Carew 703a26a723 Pass the --dart-sdk flag into the flutter analyze benchmark.
Change-Id: I232e108eb29dd3cab75c4586f777555d84385731
Reviewed-on: https://dart-review.googlesource.com/52082
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-04-20 17:33:09 +00:00
Devon Carew 1ab4cee181 Add a benchmark for running flutter analyze --flutter-repo against flutter head.
Change-Id: I0e4cb66808126b37b43edede43ec7fdd2bbec45a
Reviewed-on: https://dart-review.googlesource.com/51042
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-04-12 21:01:36 +00:00
Konstantin Shcheglov 1d184ace7b Fixes for packages:args deprecated uses.
Mostly addOption() -> addMultiOption().

Change-Id: Iab40059aab45a371e0def89fbdfcd08bd1487d47
Reviewed-on: https://dart-review.googlesource.com/47121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-19 20:15:37 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Danny Tuppeny f91ab5b64e Fix test failures on Windows
Windows doesn't have curl, but PowerShell does have Invoke-WebRequest (aliased to curl).
Also Fix set_general_subscriptions_test path issue.

Bug: https://github.com/dart-lang/sdk/issues/32355
Change-Id: I7567e2e01fc2158443b86569894ab0b17b3c5096
Reviewed-on: https://dart-review.googlesource.com/44240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2018-03-01 07:46:36 +00:00
Jaime Wren cd878bc433 Create the new flag --use-cfe in the analyzer, analysis server and analyzer_cli and migrate the old behavior of --preview-dart-2 to --use-cfe. The --preview-dart-2 flag is now a no-op, with functionality coming soon.
See https://github.com/dart-lang/sdk/issues/31640

Change-Id: I2db2e7ef6a324cbd5d369b807e331495fed167df
Reviewed-on: https://dart-review.googlesource.com/33121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2018-01-08 22:37:05 +00:00
Devon Carew c3abeef304 Add a --verbose option to the analysis server benchmarks.
Bug:
Change-Id: I5cadfacc8f2fcb5b7f0c1c140b2b08b60e65fb6c
Reviewed-on: https://dart-review.googlesource.com/25221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-01 16:20:31 +00:00
Devon Carew ee1404e91a Allow analysis server benchmarks to run with --preview-dart-2.
Bug:
Change-Id: Ifb9a5c596d3ad63012177cfb4e0bd7b107e78aff
Reviewed-on: https://dart-review.googlesource.com/20941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2017-11-15 07:37:51 +00:00
Devon Carew a714187898 Tweaks to the analysis server benchmarks.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2998813002 .
2017-08-10 12:35:06 -07:00
Devon Carew f383c17bc2 Redo our benchmarks; add a benchmark/benchmarks.dart tool.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2986293002 .
2017-08-02 08:07:38 -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 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
Devon Carew 9a852506c6 Tweaks to the analysis server --help output.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2810553002 .
2017-04-10 07:06:19 -07:00
Brian Wilkerson 203cf1d057 Remove unused import
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2549993002 .
2016-12-04 16:03:47 -08:00
Michael R Fairhurst 7e04b119aa Add a performance benchmark for the angular analyzer plugin (#27932) 2016-12-02 12:06:10 -08:00
Konstantin Shcheglov 33ecec5d4f Replace expect() with outOfTestExpect() in Analysis Server performance benchmark.
In package:test function expect() does not want to be used outside of
test() methods. So, we need a partial copy for using it in integration
tesitng code, and performance benchmarks.

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

Review URL: https://codereview.chromium.org/2413573003 .
2016-10-12 12:57:03 -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 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
Konstantin Shcheglov 34ae48a6b0 Don't run Analysis Server performance tests in checked mode.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2153163002 .
2016-07-15 09:05:09 -07:00
Konstantin Shcheglov ce55b927fc Print min/max element in memory benchmarks.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2150033002 .
2016-07-14 12:20:41 -07:00
Konstantin Shcheglov e279c1de27 Rework local benchmarks into benchmarks on the Flutter codebase.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2150793003 .
2016-07-14 08:45:54 -07:00