This change shouldn't change any current behaviour, but means all "FilePath" types in the legacy protocol spec will go through a (currently no-op) conversion. The server will be able to replace this conversion based on client capabilities in a future CL.
Because a lot of the generated classes are in analyzer_plugin, this also moves the ClientUriConverter class there.
`pkg\analysis_server\test\src\utilities\json_test.dart` contains tests that the toJson/fromJson methods go through the converter recursively (inc. map keys/values/etc.).
Change-Id: If5aec884070128eea594540fd25a9017ada86079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349060
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
My plan is to checkout the SDK when analyzer 6.0.0 was published,
then cherry-pick this commit, and publish analyzer_plugin.
In a test run, the package analyzes cleanly and all tests pass.
Bug: https://github.com/dart-lang/sdk/issues/52769
Change-Id: I10661dd665c612eeb82977bdf2f8432e022044b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Not for landing, has debug logging.
There is also an example (also not for landing) of a concrete plugin.
Change-Id: Id79336205b7b6d4cd462e7cfa0fdc7bea41c2987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
As the analyzer_plugin package is always built with the latest analyzer,
its pubspec should also report compatibility with the latest released
version.
This changes the analyzer constraint to `^2.0.0` which matches the
current version on pub.
It would be great if the next analyzer_plugin release could support the
latest analyzer.
Change-Id: I2a7b129f199bd80e6ca552821feb43b29193d2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.
This CL makes those fields optional in order to fix the deserialization
issue.
Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.
We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.
Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
I updated the analyzer version rage because de-facto tests don't
run on `0.39.12` anymore.
Change-Id: If7413b9ad9b660f3f50ccc475d7f3b35fe3cd324
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174567
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.
Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The previous publish attempt failed because
lib/utilities/navigation/navigation_dart.dart imported from
analysis_server. Bumping the version number to 0.2.4 since the fix
required exposing a new method to the public API.
Note that one import of analysis_server remains, in
test/verify_sorted_test.dart. This is less urgent to fix, since it
doesn't block publishing analyzer_plugin, it just prevents users from
running analyzer_plugin tests based on the files downloaded via pub.
I'll fix this in a follow-up CL.
Change-Id: I8ae9470db3249492b5756b8f9af742e528db004a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149387
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
analyzer_plugin has max constraint to analyzer version 0.38.0 while the latest version is 0.38.3 and it causes a lot of issues for libraries that use it (built_value for instance)
Closes#38558https://github.com/dart-lang/sdk/pull/38558
GitOrigin-RevId: 83fb8a811cae2845aec5e66a2f53259e7b347eb2
Change-Id: I68a7f4e8108d06565e9ef9d2d0411c97d4f09993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit b8614ca613.
Change-Id: Ic31ee323b21311d8a89f50bcb533316eb55f75e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110941
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Change-Id: I0948b78c481594e31a54aa356b320fbc5744eb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100302
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We need a version of analyzer_plugin that supports analyzer 0.35.x.
Change-Id: I581ed6951f3e7f68d86743bfdfdf387a10c73f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>