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>
this is under consideration for core lint inclusion: https://github.com/dart-lang/lints/issues/42
(also undoubtably nice to get the early warning.)
Change-Id: I3ea204444f48d3b4bde3ff65b4ce85a2cf2a7b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202301
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Added a few new methods to the listener, tests.
Change-Id: I477a17da3fd31db04c4960effee076680db62301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193895
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Protocol files are generated, so should be updated together with
analysis_server protocol files.
Change-Id: I8c3c7a5aecd2f7ff70c531bb794df3aed21888b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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>
I think it makes more sense for the server to read the config file than
for `dart fix` to read it and then pass the data to server as part of
the protocol, which it would effectively need to be parsed a second time.
But I don't want config files to be used outside of test mode, so I
added the flag to the protocol. Let me know if you can think of a better
approach.
Change-Id: I1c53bc995272451247e84914f2cd6b75a837ee1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180082
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@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>
This CL unifies the implementations of `package_root.dart` found in
packages `analysis_server`, `analysis_server_client`, `analyzer`, and
`analyzer_plugin`.
This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.
Change-Id: I0da44edb379b8e929dd0b1c16a6989c1e9418acb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Updates changelog and dependencies in pubspec.yaml, and I verified
by hand that the tests pass when run with the stable SDK.
Bug: https://github.com/dart-lang/sdk/issues/41679
Change-Id: Ibc2883e319678271d77dc4efa3fe4a9d61d9ce68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145621
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
I didn't update the generators to generate sorted output, I just
whitelisted those files for now.
Change-Id: Ia1d233ee978691f15bce06b2556aa3371c54183f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The isolate implementation will not be included in analysis_server_client
(as that is a public package), but to allow sharing of code this
refactors Server with a base class for common code between the
implementations. This is intended to be a non-breaking change for
the interface of analysis_server_client.
Bug: https://github.com/dart-lang/sdk/issues/41056
Change-Id: I60fc5233193527f19cbc4b937a784150a53e86b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140140
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Migration performance improves 10x on web_ui with this CL.
Also fixes a heisenbug in the linter code where identical uniqueNames
for LintCodes could wind up in objects that compare differently.
Bug: https://github.com/dart-lang/sdk/issues/40915
Change-Id: Iddddfd7659f4bc724ddf21ebae41750a0ee51e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Use --debug to switch on observatory, assert checking, and stdout/stderr
passthrough from the analysis server when running dartdev migrate.
Also adds --sdk-path and --server-path options so you have the ability
to run without the snapshot or from the non-NNBD SDK.
Change-Id: I52aba5268e1f8c2fe1d555b5dfb10e8f9133299d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138610
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>