Commit Graph

34 Commits

Author SHA1 Message Date
Sam Rawlins fbf331e0dd DAS: reformat source code with tall-style
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 23:04:00 +00:00
Keerti Parthasarathy 48fd851fad Remove unnecessary ignore comment
Change-Id: I34f2ef4244f3d665c361d15c7466201a413af6de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339226
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-01 19:51:20 +00:00
Keerti Parthasarathy 9cf01a3bee Reland changes to PubWorkspace support for multiple packages
- reworked logic for `findPackageFor` to be more cognizant of generated paths and indices.
- added more test cases for `findPackageFor`.

Change-Id: Ic8b123c8156921574873737b57415465dbf8f53b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339042
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-12-01 15:43:29 +00:00
William Hesse cc7095a6c2 Revert "Support multiple packages in a PubWorkspace."
This reverts commit d032598d26.

Reason for revert: SDK build is broken if the checkout path includes "build" as a path segment.

Original change's description:
> Support multiple packages in a PubWorkspace.
>
> A PubWorkspace is now
> - rooted at package config, or the outermost pubspec if there is no package config
> - packages are identified by pubspec
> - all packages are considered to be package build packages
>
> Change-Id: Id1552ab584ccedf60a482b93b375d1c4c7da6796
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337607
> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Samuel Rawlins <srawlins@google.com>

Change-Id: I2ecda907b8bb6164c7cc5446aceff1f168810341
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338560
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-11-28 12:34:27 +00:00
Keerti Parthasarathy d032598d26 Support multiple packages in a PubWorkspace.
A PubWorkspace is now
- rooted at package config, or the outermost pubspec if there is no package config
- packages are identified by pubspec
- all packages are considered to be package build packages

Change-Id: Id1552ab584ccedf60a482b93b375d1c4c7da6796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337607
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-11-27 23:23:26 +00:00
Sam Rawlins bb9371f255 [analyzer] Tidy up much benchmark and integration test code:
* Add a type argument to raw `Future` types (typically `Future<void>`)
* Add type arguments to raw `Map` types (typically Map<String, Object?>`)
* Add a type argument to raw `Completer` constructor calls.
* Use collection-elements in more places.
* Replace an implementation of `String.padLeft` and `String.padRight` with
  StringBuffer extension methods that use `String.padLeft` and
  `String.padRight`.
* Rename many `sb` variables to `buffer`, which is more idiomatic.
* Move some StringBuffer helper methods to be extensions on StringBuffer.
* Use constructor tear-offs instead of closures which call a constructor.
* Use single quotes where we can.
* Do not prefix constant names with the letter 'k' [1].
* In IntegrationTestMixin:
  * Rename to `IntegrationTest`, as it is never used as a mixin.
  * Public Stream fields are converted to be getters.
  * Private StreamController fields are initialized at their declaration [2],
    instead of an initialization method.
* Remove empty zero-parameter constructors.

[1] https://dart.dev/guides/language/effective-dart/style#dont-use-prefix-letters
[2] https://dart.dev/guides/language/effective-dart/usage#do-initialize-fields-at-their-declaration-when-possible

Change-Id: I7a923a80d32f74fbecf42a0fa35ae25285994097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281874
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-02-09 22:41:19 +00:00
Konstantin Shcheglov c481790c50 Add a few await(s) in DAS integration tests.
Change-Id: Iee36f383a3b5b21eab1b6bbd9c59115a4e585567
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-09 14:39:09 +00:00
Danny Tuppeny 650b9627b7 [analysis_server] Rebuild analysis contexts if changes occur between creation and watchers being ready
See https://github.com/Dart-Code/Dart-Code/issues/3438.

Change-Id: I3ca038d8c878b118a465b6f230c62912d63990eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222763
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-15 00:18:41 +00:00
Konstantin Shcheglov 87d9364e06 Update integration/analysis/navigation_test for non-function type aliases.
The test was passing for me without changes, but failing on bots.
I suspect that this is because of a random package_config.json on
my computer. Adding one explicitly in the test should fix it.

Bug: https://github.com/dart-lang/sdk/issues/45576
Change-Id: I0ccdca5713c4fd5aeac7732dc5736c4e8dbfea9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-05 15:24:26 +00:00
Konstantin Shcheglov 1c25329091 Migrate more analysis_server/test/integration/ tests.
Change-Id: Idbcf7a7c628a61f23120013a113b35256c26ed25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194004
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-05 06:19:15 +00:00
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
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 8efdee06d6 Begin adding return types in analysis_server
Change-Id: Id0daa52236bdc90cba6bfd7cf81d1b4cf47603c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133544
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-28 21:18:30 +00:00
Brian Wilkerson 5787f08619 Clean up some hints in server and analyzer
Change-Id: Ia6bb5e4e4e398dbed29fe6649c490a88d4e0a406
Reviewed-on: https://dart-review.googlesource.com/c/92523
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-09 17:58:44 +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
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 f381778867 Update the status of analysis server tests.
Change-Id: I12c2366209ae712e064888714dd65ce8ec9d89f7
Reviewed-on: https://dart-review.googlesource.com/62003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-23 18:42:31 +00:00
Paul Berry 591cf85c76 Re-enable the old analyzer/FE integration logic.
This gets the tests running again.  I'll follow this up with CLs that
reshape the ResolutionStorer API to match the Factory API we're
building, and then after that we can transition the code over to
calling the Factory API directly.

Fixes #33504
Fixes #32258

Change-Id: I105841ed5b2ed1198ec5e3e7387f694c61d36ca7
Reviewed-on: https://dart-review.googlesource.com/61101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-20 14:35:31 +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 d64fb1fcb7 Run 3 of 9 analysis server domain integration tests with --preview-dart-2.
Bug:
Change-Id: I80eb0ed230128abaea8fbb5d7c036f5e658f90a2
Reviewed-on: https://dart-review.googlesource.com/26500
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-06 07:18:18 +00: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 d02519aec4 Make the analysis server integration tests driver only.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2820893002 .
2017-04-17 11:23:38 -07:00
Devon Carew eb1839b8fd Minor changes to the generated spec, and display deprecated methods better.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2800283002 .
2017-04-15 13:43:36 -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
Devon Carew 25dfd0fa80 Deprecate execution.setSubscriptions.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2713513007 .
2017-02-24 11:01:00 -08:00
Devon Carew fbb613a3fe Update the statuses of various analysis server integration tests.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2717523003 .
2017-02-23 14:23:55 -08:00
Devon Carew 9dd2a6d452 Revert "Tweaks to the analyzer_cli."
This reverts commit a7ac08d0e7.

BUG=

Review-Url: https://codereview.chromium.org/2709163005 .
2017-02-23 09:39:25 -08:00
Devon Carew a7ac08d0e7 Tweaks to the analyzer_cli.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2709013005 .
2017-02-23 09:02:49 -08:00
Devon Carew af49bf9ff9 Fix the execution.setSubscriptions test.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2705633002 .
2017-02-17 08:23:23 -08:00
Devon Carew 7c7c895345 Add an integration test for execution.setSubscriptions.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2703723002 .
2017-02-17 07:41:03 -08:00
Devon Carew 4667e59e85 Add integration tests for the execution domain.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2691763002 .
2017-02-12 11:23:33 -08:00
Konstantin Shcheglov 46eff8e389 Implement also 'execution.mapUri' for file to URI.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2681393004 .
2017-02-10 08:48:02 -08:00
Konstantin Shcheglov 2f741af001 Fix for 'execution.mapUri' with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2682983002 .
2017-02-08 08:40:59 -08:00
Brian Wilkerson a69189972c Add failing test
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2683793003 .
2017-02-08 08:13:37 -08:00