Other than the updates to analysis options files, these changes are all
from dartfix.
Change-Id: I517b0601e36d5456960d81be9a429cbacf711141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.
Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.
Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
All changes (other than analysis_options.yaml and the change to the generator) made via dartfix.
Change-Id: I7b186371e22048ceddf6fd4407a66aba8b96480c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
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>
This doesn't remove other uses of new or const, only those that are
generated. I'll get the rest in other CLs.
Change-Id: I59c296da3d2da0f45789df156a682b9c37398087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Only spec_input.html was changed, the rest of the files were regenerated.
Change-Id: Ib4644f811d86c46da6d01c601107ede8537e39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128366
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Also add ENUM_LIKE property editor, that is like ENUM, but allows
such free-form expressions.
R=brianwilkerson@google.com
Change-Id: I3910b6bea98110c192b6cc9fb716b73270e1d97c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111985
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Only self properties for now.
No compound properties.
No virtual Container properties.
R=brianwilkerson@google.com
Change-Id: Icd61f45ecc95c45037c3998a927eb267fd13c4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
We could also remove FlutterCorrections, because right now we don't
use it, but we will restore it soon as we get new Flutter domain
methods.
R=brianwilkerson@google.com, devoncarew@google.com
Change-Id: I084fe5acbe5d854673c7247d734aeca1f8d721af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
We need this to support existingImports filtering, because filtering
is done on suggestion basis, not on the whole suggestion set basic,
because of re-exports.
R=brianwilkerson@google.com
Change-Id: Id97cb122fa6e3c5c62e367098e1917eba997a76f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104808
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This adds quite a lot of information though, because we send many
strings.
Before: 20686 characters.
After: 55345 characters.
Theoretically we could do better, and send information about existing
imports only once as well, so when the user continues typing in a
single file, without touching imports, we don't send any new data
about imports (maybe just a confirmation that it is still the same).
But I'm not sure if this is a worthwhile optimization.
Actually, even included suggestion sets have similar property - they
don't change for a given file, unless there are changes to other
libraries which we might want to include.
R=brianwilkerson@google.com
Change-Id: I2f55e2dc85508849146aa39eb279beabaec937c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This change adds a new, experimental completion domain request
`completion.listTokenDetails`. Its purpose is to allow
other programs to observe and make smarter decisions contingent
upon analyzer's internal knowledge of a Dart program.
Bug: 36083
Change-Id: I5ab477221efeac076eccc873a29cf6feae91052e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95100
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Sometimes there is no difference between 'relevance' and 'relevanceBoost',
for example for enum constants. But for primitive constants, there might
be multiple `double` constants, in different libraries with their own
different relevances. And it would be nice to keep relative relevances
of these libraries in primitive type constants.
R=brianwilkerson@google.com
Change-Id: I3641a4709e09f5c5dd979f5ca8df7b0235c708d2
Reviewed-on: https://dart-review.googlesource.com/c/92623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
* Update the readme to discuss required vs suggested fixes
* Remove the out-of-date options section from the readme
* Update dartfix and analysis_server_client versions and changelog
Change-Id: Ida4b30f9f89eb84a2fe856f61562ff73bf6725da
Reviewed-on: https://dart-review.googlesource.com/c/92153
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
We need it to know if names in the syntactic scope will shadow
the requested name if unprefixed import is used.
R=brianwilkerson@google.com
Change-Id: I1fd28add9241b27795160c4705a80e0f8aa6c647
Reviewed-on: https://dart-review.googlesource.com/c/92022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
interest in receiving not yet imported code completions from specific
packages and libraries.
The design of this interaction aims to avoid forcing analysis server
to send every public symbol from dependent packages at every completion.
Instead, clients express interest in certain packages and/or libraries
and analysis server will notify with the entire set of symbols for
each of them only once. Then it is the client's responsibility to save
these pre-computed completions in memory, and analysis server can
instruct the client on how to union them with the base set of completion
suggestions at code completion time.
Bug: https://github.com/dart-lang/sdk/issues/35680
Change-Id: I42c6fddc5d8daa2b546daa81456c0992e3ef547d
Reviewed-on: https://dart-review.googlesource.com/c/90125
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This CL extends the dartfix protocol to allow specifying which
fixes should be applied. In summary:
* includedFixes - list of fix names to be applied
* includeRequiredFixes - bool indicating required fixes should be applied
* excludedFixes - list of fix names that should not be applied
Given that the client can specify the fixes to be included/excluded,
then the dartfix cmdline help text should include the list of known fixes.
Rather than hard code this in the dartfix client, a new edit.getDartfix
request has been added to return the list of known fixes.
Change-Id: I319f6f405a5d29757bf28b70b778a449f901bbef
Reviewed-on: https://dart-review.googlesource.com/c/91700
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This will enable clients such as IntelliJ to display the package which code
completions are being offered from in addition to the keyword or identifier
that they're already getting from analysis server.
R=brianwilkerson@google.com
Change-Id: I30311451ad56b4eddbe73da20641ee0d14849293
Reviewed-on: https://dart-review.googlesource.com/c/88744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
Original change's description:
> Add AnalysisDriver.resetUriResolution() and use it for analysis.reanalyze request.
>
> This CL changes "analysis.reanalyze" API. We decided to repurpose it. It was not
> used for some time now in IntelliJ, and AFAIK has never been used in VS Code.
>
> R=brianwilkerson@google.com, paulberry@google.com
>
> Change-Id: I7510b0189197c9f3f848b0fc59a7b2bd22889ac7
> Reviewed-on: https://dart-review.googlesource.com/c/85523
> Reviewed-by: Paul Berry <paulberry@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Change-Id: I828c9a77f1e28d44c00bfcf39527514e39cccc42
Reviewed-on: https://dart-review.googlesource.com/c/86221
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This updates dartfix to more narrowly verify the analysis server
protocol version and print instructions for the user if the protocol
version expected by dartfix is incompatible with the current Dart SDK.
This is necessary because the edit.dartfix protocol is experimental
and will continue to evolve.
Change-Id: Ib31eb594a8a94416cb4fc676e7da9150f8c99b6a
Reviewed-on: https://dart-review.googlesource.com/c/84780
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reduces the client functionality and renames some
of the classes and methods in the API.
Specifically:
- rename Server to Client
- rename ServerConnectionHandler to ConnectionHandler
- rename Client.start to Client.startServer
- rename Client.stop to Client.stopServer
- rename Client.kill to Client.killServer
- extract behavior from Client into Listeners
- move some of the listeners into dartfix
- make several Client fields private
Change-Id: Ie71b0ac55b489099a848764251e8369c27f6ea2d
Reviewed-on: https://dart-review.googlesource.com/c/84460
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
* Make the NotificationHandler a mixin
and move it to /lib/handlers
* Add new notification handler mixins
- AnalysisCompleteHandler
- ServerConnectedHandler
* Add Server.stop method
.. and address comments in
https://dart-review.googlesource.com/c/sdk/+/83180
Change-Id: I94ba657f20520ae4bb0e479a014c11509eeb9d2c
Reviewed-on: https://dart-review.googlesource.com/c/83520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
... and generate the analysis server protocol version
Change-Id: I585e50cc854d5ae1aa7440a14f856c983bbfc93a
Reviewed-on: https://dart-review.googlesource.com/c/83180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Updates to dartfix for publication including:
* add changelog, readme, and license
* update pubspec version and executables
along with a collection of smaller changes including:
* test cleanup
* remove duplicate time value from verbose output
* read dartfix pubspec version and pass that to analysis server
Change-Id: Ifa94df45e6cbcf9a98f7bf393c22e06eaab48c38
Reviewed-on: https://dart-review.googlesource.com/c/82240
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Clients may now optionally add clientId and clientVersion information
when starting the analysis server.
In addition, this CL adds an example of how to use this package
and updates the changelog, readme and pubspec.
Change-Id: I969a13a7d8379d6289fbbbc5f8d1b66315aa6a37
Reviewed-on: https://dart-review.googlesource.com/c/82165
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This updates the edit.dartfix protocol to separate location from the text
describing the changes so that the dartfix client can choose
what location information to display and how it should be displayed.
Change-Id: Ic56a4cb187538571d60136d6de9265d879fccb53
Reviewed-on: https://dart-review.googlesource.com/c/81780
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This replaces dartfix dependencies on ...
* analysis_server
* analyzer (except for testing)
* analyzer_plugins
... with a dependency on analysis_server_client.
Change-Id: If511de69333e925ae082fa06c5114188c3c405b1
Reviewed-on: https://dart-review.googlesource.com/c/81342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Also updated the package references in a number of pubspecs to
more closely align with the package versions that are in the SDK
Change-Id: I061951587befa4211ac7455cf1179911eb07efc0
Reviewed-on: https://dart-review.googlesource.com/c/79920
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>