Commit Graph

36 Commits

Author SHA1 Message Date
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 f60536c194 Enable slash_for_doc_comments in analysis_server
Change-Id: Id2734d4c9ce591c5746bb9aa55810c78183db38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-14 17:17:17 +00:00
Sam Rawlins 327b1eb24f analysis_server: Make private fields final where possible
Change-Id: Ibdeb7e66f07bf81205d70ac5d1c4cb4aa5a97671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-01-08 22:08:02 +00:00
Brian Wilkerson 52c6620986 Enable unnecessary_const in analysis_server
Change-Id: I44d9902cb23d005ebedd4bc37d57d3751a8ebdc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-19 17:32:52 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Konstantin Shcheglov e978b32a7e Stop using '.type' in analysis_server.
R=brianwilkerson@google.com

Change-Id: I0cff6d1b46e56651d7ed2d60e0bf76bb7272f5de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117294
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 19:05:13 +00:00
pq 52abcd3dd2 apply prefer_equal_for_default_values
Change-Id: I9b6fd3ee18ec834a5db3d0d25455b6db9ea4fbe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108664
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-07-10 19:31:40 +00:00
Konstantin Shcheglov e5164be27e Issue 35127. Fixes for mixin implements / overrides.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/35127
Change-Id: I5869175cee13b6e22ce25c2d361b0b1aa52efe48
Reviewed-on: https://dart-review.googlesource.com/c/91690
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-31 16:01:55 +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 e81c1c57de Remove the workaround for a stale issue.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/25884
Change-Id: I87741664f00200170990e9a13d2f639c41671bda
Reviewed-on: https://dart-review.googlesource.com/71924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 15:33:17 +00:00
Konstantin Shcheglov 1b8a3b1045 Implement support for overridden elements that are declared in mixins.
R=brianwilkerson@google.com

Change-Id: I70ca606b23b928481f24d1322cfbd01a9b3d3e5f
Reviewed-on: https://dart-review.googlesource.com/54071
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-07 21:56:25 +00:00
Brian Wilkerson a6214b3129 Remove more libraries directives from server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2894883002 .
2017-05-19 08:42:30 -07:00
Brian Wilkerson 338c95be8c Sort the files in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Brian Wilkerson ec08de7df8 Get more data to track down issue 25884
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1775913005 .
2016-03-10 08:21:40 -08:00
Konstantin Shcheglov e7e52ae2c0 Issue 25542. If an element does not have its own documentation, use the documentation from the overridden superclass member or an implemented interface.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25542

Review URL: https://codereview.chromium.org/1632033002 .
2016-01-25 17:09:48 -08:00
Konstantin Shcheglov 5dc34340a1 Issue 25538. Fix for notification and private methods.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538

Review URL: https://codereview.chromium.org/1610773003 .
2016-01-21 08:01:51 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov 38a4193b5f Issue 25244. Disable invalid overrides.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25244

Review URL: https://codereview.chromium.org/1519413002 .
2015-12-13 15:50:12 -08:00
Konstantin Shcheglov 089f84f6cd Keep only unique overridden elements.
If the implemented interfaces don't declare an element, keep only a single copy of the element - from the superclass.

In Dart Editor we use any element, but in in IDEA we show all of them, and we don't want to have duplicates.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1273003005 .
2015-08-10 16:13:43 -07:00
Konstantin Shcheglov f118546d06 Issue 23332. Don't compute overrides for static members.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23332

Review URL: https://codereview.chromium.org//1151573011
2015-06-01 10:42:22 -07:00
scheglov@google.com 2a7227b15d Fix for computing overridden/implemented members from interfaces.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1037193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44737 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 15:16:21 +00:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//969113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
scheglov@google.com e9e0694e2f Remove references to Engine classes from protocol.dart
R=brianwilkerson@google.com, paulberry@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org//628293004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40948 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 00:24:48 +00:00
scheglov@google.com 482ecda504 Simplify conversion of empty lists to null.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//629283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40945 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 21:37:15 +00:00
paulberry@google.com 1f50bf550a Remove special list behavior in analysis server protocol.
Previously, for optional lists, the absence of a list was treated by
the toJson and fromJson methods as equivalent to the presence of an
empty list.  This disagreed with the API documentation in several
places and created the risk of null reference exceptions in clients.

This change makes optional lists behave just like optional fields of
any other type.

BUG=dartbug.com/21230
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//625413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40939 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 16:32:14 +00:00
paulberry@google.com 0c0fd777a6 Finish modifying analysis server to make use of code generation.
Generated code is used to produce the response to these requests:
- analysis.updateOptions
- analysis.updateContent
- analysis.setSubscriptions
- analysis.setPriorityFiles
- analysis.setAnalysisRoots
- server.shutdown
- server.setSubscriptions

Generated code is used to produce these requests:
- server.shutdown
- server.getVersion
- server.shutdown
- server.connected

Generated code is used to produce these notifications:
- completion.results
- analysis.overrides
- analysis.outline
- analysis.occurrences

Generated code is used to decode these notifications:
- server.status

In addition, some dead code was removed, the 'protocol.dart' and
'protocol2.dart' files were combined, and the fields Response.result,
Request.params, and Notification.params were made private (to
encourage future use of the generated code).  Also, some overly
verbose import statements were cleaned up by using "hide" rather than
"show".

R=danrubel@google.com

Review URL: https://codereview.chromium.org//506433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39516 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 10:48:16 +00:00
paulberry@google.com 10fdb7677a Change analysis server protocol to omit empty lists when optional.
For object fields of type List that are marked as optional, FromJson
code automatically populates the data structure with an empty list
when the field is omitted.  ToJson code automatically omits the field
when its value is an empty list.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//482573004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39507 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 18:03:34 +00:00
paulberry@google.com caf0592503 Make more use of generated code in analysis server.
The following generated classes are now used:
- Element
- Location
- Occurrences
- Outline
- OverriddenMember
- Override
- Position
- SearchResult
- SearchResultKind
- SourceFileEdit
- TypeHierarchyItem

Generated code is used to produce the responses to these requests:
- completion.getSuggestions
- search.findElementReferences
- search.findMemberDeclarations
- search.findMemberReferences
- search.findTopLevelDeclarations
- search.getTypeHierarchy

Generated code is used to handle these notifications in unit testing:
- analysis.navigation
- analysis.occurrences
- analysis.outline
- analysis.overrides
- search.results

In addition, we no longer bother to test the JSON conversion code on
AnalysisError, since it is code generated.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//479683005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39470 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:04:06 +00:00
scheglov@google.com e1e1febe72 Merge two constants.dart into one.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//478933003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39355 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:34:54 +00:00
paulberry@google.com 7226309842 Import analysis_services.dart into analysis_server.dart.
Having two separate packages doesn't really have any benefit, and has
the downside of forcing us to carefully avoid circular dependencies
between the two.  It makes more sense to just combine them.

This is largely a mechanical change consisting of the following renames:

1. pkg/analysis_services/lib/src/* -> pkg/analysis_server/lib/src/services/*
2. pkg/analysis_services/lib/* -> pkg/analysis_server/lib/src/services/*
3. pkg/analysis_services/test/* -> pkg/analysis_server/test/services/*

There were 4 instances where 1 and 2 created a collision:
.../services/correction/assist.dart, .../services/correction/fix.dart,
.../services/refactoring/refactoring.dart, and
.../services/search/search_engine_internal.dart.  To fix the
collision, the files coming from pkg/analysis_services/lib/src were
renamed to "..._internal.dart".

In addition, pkg/analysis_services/test/test_all.dart was modified to
call pkg/analysis_services/test/services/test_all.dart.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//484733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39349 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 20:17:49 +00:00
scheglov@google.com cef6c26a95 Update 'analysis.override' notification to the latest spec.
R=brianwilkerson@google.com, jwren@google.com
BUG=

Review URL: https://codereview.chromium.org//440743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38882 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 21:21:22 +00:00
danrubel@google.com 256e11dd57 more progress implementing analysis server code completion
- add more properties returned by completion suggestion
- move completion suggestion into services
- move property constants into services for use by completion services
- move HasToJson into services for completion
- remove duplicate completion test

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org//407833002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38418 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 02:04:49 +00:00
scheglov@google.com 1de8ecb571 Use HasToJson when set Reponse/Notification parameters.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//389413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38206 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:54:04 +00:00
scheglov@google.com 64f238ba34 Implemention of the 'analysis.overrides' notification.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//364083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37971 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 03:24:27 +00:00