Brian Wilkerson
9db372e6f4
Make Location.endLine and Location.endColumn optional fields in the protocol
...
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 >
2021-07-15 17:35:55 +00:00
Konstantin Shcheglov
114d7b980a
Migrate analyzer_plugin package to null safety
...
Bug: https://github.com/dart-lang/sdk/issues/45236
Change-Id: I01175a2b2b1eb3ce6cdf30ade794d8186c6e8ead
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-30 00:29:37 +00:00
Brian Wilkerson
d00ef8611a
Update the server protocol to support passing back the line and column numbers for the end of a range
...
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-18 19:22:23 +00:00
Sander Kersten
089ca8c1eb
Make compute assists async and fix message
...
Fixes #44730 .
Fixes #44731 .
For "fixes" there were similar bugs that I've fixed as well.
Closes https://github.com/dart-lang/sdk/pull/44758
https://github.com/dart-lang/sdk/pull/44758
GitOrigin-RevId: e08b25ea2890fc6f796c9cc0411fe7a71eaf70b9
Change-Id: I026c325d9d362775e178a7621a17ce6ff919ed40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-01-23 17:58:57 +00:00
Mike Fairhurst
334d368146
[analyzer_plugin] Remove unused dart:async imports
...
Change-Id: I079d5f7c1f6c36d4e76ecd41b5d22e4199c1304c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161464
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-02 18:09:52 +00:00
Konstantin Shcheglov
a45d66c6e9
Make MockAnalysisDriver implement AnalysisDriver, not extend.
...
The way we used to configure it does not work with changed I want to
make, specifically we were given SourceFactory with no resolves,
so no DartUriResolver, so no SDK.
R=brianwilkerson@google.com
Change-Id: Ibf798aae1792366cfbe240f9781038568936146d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-05-28 21:56:45 +00:00
Brian Wilkerson
6f15530536
Enable omit_local_variable_types in analyzer_plugin
...
Change-Id: I908e15b4820eab0e8375994ce3cebfac332306f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-03-30 04:06:49 +00:00
Konstantin Shcheglov
abf7d1fc08
Issue 40572. Pass Packages to AnalysisDriver.
...
Just as SourceFactory is given to AnalysisDriver, so should be Packages.
Understanding --packages and discovery in out of scope.
Bug: https://github.com/dart-lang/sdk/issues/40572
Change-Id: Id120fba0f23a4423797fa9976c4cda5ed54dad53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135188
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-02-11 00:57:45 +00:00
Brian Wilkerson
7494f58032
Enable always_declare_return_types in analyzer_plugin
...
Change-Id: I972f0e2569de64397828d887b1fb37fcf57e006f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133408
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-26 23:13:34 +00:00
Brian Wilkerson
491201aae6
Enable use_function_type_syntax_for_parameters in analyzer_plugin
...
Change-Id: I78e70d652a1f4c8539767d65beb9a08882f78e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132455
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-18 20:12:33 +00:00
Brian Wilkerson
f34a25099b
Enable slash_for_doc_comments in analyzer_plugin
...
Change-Id: I9cafff7fcbf6c8930e3ac8ddba05061601aa8223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132452
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-18 18:17:31 +00:00
Brian Wilkerson
03c33360b7
Remove unnecessary uses of new in analyzer_plugin
...
Other than
- the change to enable the lint (in analysis_options.yaml) and
- updates to the generator (in tool) to stop generating 'new',
all of the changes were generated by dartfix.
Change-Id: I9d14b99ab748ef5b80f8800a802e20100eee04a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128577
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-12-17 20:12:05 +00:00
Jens Johansen
9f57cf71d7
Add a blacklist to spelling tests; spell-check all packages and sdk with blacklist
...
Change-Id: I5bf3d5784d2ba48568a2699bb09ae39a85be17c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115214
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-09-03 12:39:24 +00:00
Konstantin Shcheglov
e3c8774543
Add AnalysisSession.analysisContext, stop using AnalysisDriver's AnalysisResult outside the driver.
...
Change-Id: I63138e002d9e777f51d2d843f7ef2b1f32fed3e0
Reviewed-on: https://dart-review.googlesource.com/c/82529
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-02 14:16:31 +00:00
Konstantin Shcheglov
e223bd3628
Replace most of direct uses of MemoryResourceProvider with ResourceProviderMixin.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I87114418b63ef68665b9c3e487980a72db00ec6a
Reviewed-on: https://dart-review.googlesource.com/c/81744
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-27 17:50:10 +00:00
Brian Wilkerson
180b3dd301
Remove extra spaces in copyright notices in analyzer_plugin
...
Change-Id: Icf01fbdd84747fc92908fe5ca818124c5df992af
Reviewed-on: https://dart-review.googlesource.com/c/79640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-13 18:05:23 +00:00
Brian Wilkerson
0bb8cbd9cb
Use void in place of Null in analyzer_plugin
...
Change-Id: I21a3d3646c5906256e21fb8d7d71f8433b1b39e9
Reviewed-on: https://dart-review.googlesource.com/69500
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-11 15:30:28 +00:00
Devon Carew
17b53a2835
Test out no_implicit_casts on the analyzer source base.
...
Change-Id: I4eb2414d7d9bbe21883c9e5e8eca10f2eaafb465
Reviewed-on: https://dart-review.googlesource.com/62725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2018-06-28 02:20:43 +00:00
Konstantin Shcheglov
8c20f26234
Use mock of AnalysisResult in analyzer_plugin.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ia185d6f24d3cd250dc0b42aecb64aea482e0a46a
Reviewed-on: https://dart-review.googlesource.com/58841
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-06-06 19:09:54 +00:00
Konstantin Shcheglov
a9fef15ff3
Add FileResult and AnalysisDriver.getFileSync().
...
I thought that getSourceKind() might be not the best API. We are moving
away from Source, and it seems that we should stop using SourceKind as well.
R=brianwilkerson@google.com
Change-Id: I0fcff8dc8cefcd6d8fb899badab8037bf8d67775
Reviewed-on: https://dart-review.googlesource.com/58442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-06-05 20:51:37 +00:00
Danny Tuppeny
568e977a35
Update FoldingKinds enum, update specs and increase version number
...
Bug: https://github.com/dart-lang/sdk/issues/33033
Change-Id: Ieccfd90ead67a9803744c54db4eec8eea0b0403c
Reviewed-on: https://dart-review.googlesource.com/54920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2018-05-14 16:48:48 +00:00
Konstantin Shcheglov
9976cddcd7
Shared cache of FileState contents.
...
This makes Flutter repo analysis about 12% faster.
R=brianwilkerson@google.com , devoncarew@google.com
Base: 76.2 74.9 75.9
After: 65.6 66.0 66.6 67.1
Change-Id: I5afffdae15eacf2c09c4ede40d7312c8827bae0c
Reviewed-on: https://dart-review.googlesource.com/51061
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-04-13 16:43:36 +00:00
Brian Wilkerson
37042bb59b
Add an integration test for kythe support with bug fixes
...
R=jwren@google.com
Review-Url: https://codereview.chromium.org/3006693002 .
2017-08-28 10:07:04 -07:00
Brian Wilkerson
608bf972b0
Add folding support for plugins and update the main tutorial page
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3004733002 .
2017-08-28 08:05:37 -07:00
Brian Wilkerson
d1a2a43d54
Add plugin support for occurrences (and fix typo)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3006703002 .
2017-08-28 08:04:42 -07:00
Brian Wilkerson
dd00fc7750
Add support for highlights notification
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3004613002 .
2017-08-25 09:21:36 -07:00
Brian Wilkerson
efd4051c7e
Add utilities to support the outline notification
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3002233002 .
2017-08-24 11:59:06 -07:00
Brian Wilkerson
c6b206a2d9
Clean up after some recent code changes
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3009513002 .
2017-08-24 10:01:11 -07:00
Brian Wilkerson
e8010e4a44
Enhance NavigationMixin to handle notifications
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3008443002 .
2017-08-24 07:44:51 -07:00
Brian Wilkerson
0a50effce5
Add minimal support for sending notifications
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3003573002 .
2017-08-23 13:26:59 -07:00
Brian Wilkerson
6f81034a73
Initial Kythe support for plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2997833002 .
2017-08-14 08:24:15 -07:00
Paul Berry
e2f77056a5
Eliminate dependencies on pkg/front_end.
...
The API for pkg/front_end is still in flux so we want to avoid having
any packages depend directly on it (other than analyzer and
back-ends).
This CL re-exports some of the critical pieces of front_end needed by
analyzer clients so that those clients can access them via analyzer,
without having to directly depend on front_end. It also updates
pkg/analyzer_plugin to make use of those re-exports.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2993123002 .
2017-08-07 09:46:30 -07:00
Brian Wilkerson
8bbf373a5e
Remove the analysus.reanalyze request from the plugin API
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2988743002 .
2017-07-25 12:10:52 -07:00
Brian Wilkerson
75504c2b25
Remove references to AnalysisDriver from the plugin mixin classes
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2970203002 .
2017-07-06 09:07:10 -07:00
Brian Wilkerson
4749014b06
Remove an unused request and the associated type
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2964113003 .
2017-06-30 09:44:59 -07:00
Brian Wilkerson
4a10003924
Update the plugin API
...
R=maxkim@google.com , mfairhurst@google.com
Review-Url: https://codereview.chromium.org/2953093002 .
2017-06-23 12:31:00 -07:00
Brian Wilkerson
624f4d8b3d
Add tests for recently added mixins and improve plugin tests
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2932553004 .
2017-06-09 07:27:16 -07:00
Brian Wilkerson
7f5e1f260f
Add a getNavigation request for plugins
...
R=mfairhurst@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2908523002 .
2017-05-25 10:51:24 -07:00
Brian Wilkerson
091752f158
Register files with new drivers (issue 29641)
...
Review-Url: https://codereview.chromium.org/2886343002 .
2017-05-18 07:43:47 -07:00
Brian Wilkerson
daffcecc11
Pass the sdk path to plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2885993004 .
2017-05-17 08:19:49 -07:00
Brian Wilkerson
3085734ef6
Generate common types into a separate library
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2880443006 .
2017-05-13 08:12:14 -07:00
Brian Wilkerson
80eec49e40
Make the plugin request handling async
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2877793002 .
2017-05-11 09:07:06 -07:00
Brian Wilkerson
9ca84e15f4
Improve default support provided for plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2861373005 .
2017-05-08 10:01:35 -07:00
Brian Wilkerson
84ca84b1a7
Implement more of the behavior of a plugin; refactor some API
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2857233002 .
2017-05-03 12:48:39 -07:00