Brian Wilkerson
1ad68b9b16
Make local variables that hide fields be final (analysis_server)
...
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.
Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-24 18:12:07 +00:00
Brian Wilkerson
529e8abc5c
Minor improvements to the code completion metrics tool
...
It now captures and prints the minimum and maximum values for several
characteristics. It also now allows the flag controlling whether the
available suggestion sets are used to be set for each experiment rather
than globally (which allows us to now compare the results with and
without the flag set).
Change-Id: I5b5930216ff2f448de35f6dbf3ccd9de712179d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196564
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-23 00:07:36 +00:00
Brian Wilkerson
f32f6afbfd
Fix a couple of bugs in the metrics tool
...
Change-Id: Ib8c17f9e9963996118473c5c32d3d6fb51ce632e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196343
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-21 20:56:11 +00:00
Danny Tuppeny
97e9186df8
[analyzer] Improve null handling in LSP server
...
Change-Id: I2060912853d131fad1d02ddc68f0b62ab16e3b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-20 19:30:38 +00:00
Danny Tuppeny
77466f2b83
[analyzer] Migrate remaining LSP code to null-safe
...
Change-Id: I52c7d16bdaf9f68148a8d7a956330bc54608ec43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-19 19:35:28 +00:00
Brian Wilkerson
543d653ca8
Migrate the migration runner script in server
...
Change-Id: Ie4fc8e19a360ff0d201b0f91f2de9cb093566ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195960
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-19 18:13:08 +00:00
Konstantin Shcheglov
26d9fbbd04
Add getResolvedUnit2(), deprecate getResolvedUnit().
...
Change-Id: I0217fefb2747f2f9bd757bc041b53acaf3d1a8f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-16 21:33:54 +00:00
Danny Tuppeny
934be22ab5
[analyzer] Support package descriptions + version numbers in pubspec.yaml package completion
...
Change-Id: I064689814b1f81671be870bb5c8499ebf35ab468
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195077
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-15 20:24:32 +00:00
Danny Tuppeny
1aa56ed7b1
[analyzer] Migrate LSP semantic tokens + generation script to null-safe
...
Change-Id: I3d903a406808c50d995c50b8f890db8f97de8cd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195276
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-14 20:08:15 +00:00
Danny Tuppeny
7ea96c93d5
[analyzer] Migrate generated LSP code to null-safe
...
Change-Id: Ibed2e796bfcfe2ad48460cf1029a9fd9034e6418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195274
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-14 18:24:25 +00:00
Brian Wilkerson
61fda382c2
Migrate the LSP protocol generator
...
Change-Id: Ib44004af7ee760c3cec4f6bb72e7adba0b64988e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195180
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-14 16:08:51 +00:00
Brian Wilkerson
e453325e92
Migrate the supported_lints tool
...
Change-Id: I4df8b8fd209e96e18e8165d01f3860fe9dbbee7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-13 17:17:57 +00:00
Brian Wilkerson
d08c65be05
Migrate the completion metrics tool
...
Change-Id: I6d66ebd2d5cbb32147252927819f9d6533cb4012
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194882
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-10 04:15:23 +00:00
Danny Tuppeny
e8d53cff92
[analyzer] Improve handling of loose files and context rebuilds
...
Change-Id: Ifd047a29953503a70216ce29b3fe4cdbfc4132df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192926
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-08 17:49:35 +00:00
Brian Wilkerson
b0a358c10b
Migrate two more tools in server
...
Change-Id: I5cd174caa77653cc39a37a8c0464f0f1e93c4a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-08 01:03:34 +00:00
Konstantin Shcheglov
ad498f34dc
Migrate a few test/tool/completion_metrics/ libraries.
...
R=brianwilkerson@google.com
Change-Id: I8221b0c2f97ada211b101d31420e60062f30887d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194115
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-06 22:58:53 +00:00
Brian Wilkerson
d4bc97ec16
Migrate a couple of files in the completion support
...
Change-Id: Idcb26425dad2b2a1d88346ad0ceea9d1fff209f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194012
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-05 16:40:06 +00:00
Konstantin Shcheglov
4757152a0b
Migrate a few random analysis_server libraries.
...
Mostly no-ops.
Change-Id: Ia538aed657576203ec104bd849862bcc87025bef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-05 16:06:36 +00:00
Brian Wilkerson
23bee1698f
Migrate the instrumentation log viewer tool
...
Change-Id: I2087c3c9d25cdf3266142ba57bb8dbc57bc3fc46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194002
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-04-05 05:11:45 +00:00
Konstantin Shcheglov
f1fb297ad9
Migrate analysis_server/tool/spec
...
Change-Id: Ic8d7596198876d78f6628121ef0feb2fc9ea886d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-05 05:08:25 +00:00
Konstantin Shcheglov
454d4db340
Use Object as the type for TypeUnion in analysis_server protocol generator.
...
Change-Id: I6772182341df26211ff245748afb983e9d1b6ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-03 19:44:24 +00:00
Konstantin Shcheglov
c2d660d161
Migrate analysis_server and analysis_server_client protocol.
...
Change-Id: Ie0912627733f0481de0d3239647a4978e5327f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-02 06:46:41 +00:00
Brian Wilkerson
628e630ca2
Convert a few utility libraries to null safety
...
Change-Id: I1e1cde29a40eb498d8e25c72189641d568d7db03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193591
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-03-31 05:45:32 +00:00
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
2802e4fbdc
Make the map file explicit rather than trying to coordinate between caller and callee
...
Change-Id: I6f7b7807eeca7a023772c0bdcf4992e4762f84e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-27 22:42:56 +00:00
pq
a68db103ae
rename lintProducerMap2 => lintProducerMap
...
(Also removes deprecated "legacy" lintProducerMap.)
Change-Id: I8c9222657029fe709228e010c4b90f34244814d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-03-26 14:50:04 +00:00
Brian Wilkerson
464cc509ab
Remove one move ignore comment from generated LSP support
...
Change-Id: I905056f98780f127466caa0ba9e8a5f6d13a7282
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192285
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-22 14:09:23 +00:00
Brian Wilkerson
c5d01ec4f7
Remove a couple of ignore-in-file comments and make one more unnecessary in generated code
...
Change-Id: I8313fe2b4c3908dd5751f7eeca417adfcb2e5790
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192040
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-19 14:44:27 +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
Danny Tuppeny
44275c6001
[Analyzer] Add support for LSP experimental SnippetTextEdit
...
Change-Id: Id37a1954c71fb10c4968c5af6a873ad0ef864a5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-16 18:40:50 +00:00
Brian Wilkerson
78ca98ac8e
Minor cleanup to SuggestionBuilder
...
Change-Id: I1f3a71b81e7f2bb29808102ea076c7e7e67a6967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190740
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-11 17:18:30 +00:00
Brian Wilkerson
8f2ca0b248
Make markdown the only output option for the completion metrics tool
...
Change-Id: Id4c2020ea85453980f1ed044552b76f13316c7b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-06 20:57:49 +00:00
Konstantin Shcheglov
53c8eda967
Keep more specific types for AnalysisContextCollectionImpl to avoid downcasts.
...
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.
Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-03-06 06:23:25 +00:00
Konstantin Shcheglov
c8d6f85d0f
Enforce lint unnecessary_parenthesis in analysis_server.
...
Change-Id: Ib68c124988743b45807015e7274f429fff67fe44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-03-06 05:20:16 +00:00
Brian Wilkerson
7aaf620de7
Make it easier to experiment with enabling or disabling existing features with example
...
Change-Id: I22b7a1259fee585e1baeba0faf7b62c9f0d2f5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-03-06 01:02:24 +00:00
Danny Tuppeny
78dd7a4bb3
[analyzer] Suggest arg names in front of positionals
...
Fixes https://github.com/dart-lang/sdk/issues/40654 .
Change-Id: I329d8b4af9371e8d61c4044bb003f9c22cd72c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-04 18:21:19 +00:00
Brian Wilkerson
61d09495b9
Add code to support comparing the quality of code completion relevance tables
...
Change-Id: Ib4500712e3e63114a357af8cf2c2479b70cc27d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188583
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-03-02 22:37:47 +00:00
Danny Tuppeny
ff61ff7d33
[analyzer] Call toJson() on items in Lists when generating LSP json
...
Change-Id: I9f5876dc577499ae609079eaecae6a3eb47535d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188288
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-03-02 15:24:38 +00:00
Brian Wilkerson
4643444205
Add map/reduce functionality to the completion metrics tool
...
Change-Id: I69d206fa7d817b022eedac01a13355a14a09a650
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-26 20:45:17 +00:00
Brian Wilkerson
71cd2eab85
Add support to the relevance table generator to generate multiple tables for comparison purposes
...
Change-Id: Iba8dc640540b1689d619a928cc7075c4b17555ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-24 21:36:34 +00:00
Konstantin Shcheglov
fd81b73e67
Replace AnalysisEngine.isDartFileName() with file_paths.isDart()
...
Change-Id: Icf5d524945ffdb7087b96555968804946b4e5af4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-24 21:03:24 +00:00
Brian Wilkerson
2c982b0c1f
Enhance the command-line relevance table generator tool to support a map-reduce style of table generation
...
Change-Id: Ie0e26094b4cd6acaf864556d04d3de0415683cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186501
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-23 17:46:21 +00:00
Danny Tuppeny
c4edcc4cfa
[analyzer] Support separate insert/replace ranges for completions
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/2998 .
Change-Id: I8e989932c16dc97f704c79c06374c8d1d1881f7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-23 17:43:11 +00:00
Parker Lougheed
5ef1dcdcab
[Analysis Server] Update font inclusions for API doc
...
Some of the weights we used were missing causing blurry text. I've also switched from Source Code Pro to Roboto Mono to be consistent with other Dart websites.
While not related I also updated the semver link to https.
Change-Id: Ifc4a10a05d795134caade2081045517426c21fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-20 16:48:56 +00:00
pq
fbf07bc7b7
migrate towards a shared nonLintProducerMap
...
Introduces a new map datastructure and migrate BulkFixProcessor to use it.
Change-Id: I6294cce875ac5e5052b363282454af6dadf011f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-02-11 18:37:30 +00:00
Brian Wilkerson
f4f974a1ac
Add a feature to decrease the probability of suggesting noSuchMethod
...
This feature improves the metrics in locations where methods can be
suggested and has no effect in the remaining locations. The improvement
is very small, but I think it's worthwhile nontheless.
Change-Id: I88cdb19a1d870f5a27871925d56ce204f5b3f8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-02 18:48:54 +00:00
Brian Wilkerson
8363ed81b0
Enhance the relevance table generator
...
Add support for serializing and deserializing the data and for combining
data from multiple sources. The intent is for this to be used to allow
us to efficiently analyzer larger code bases to get more accurate values.
Change-Id: I89fe11bbfa7acc2cab56c2f06cb9ac06c2a4fb30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-01 00:24:08 +00:00
Konstantin Shcheglov
5c426d8d43
Add Element.aliasedType to the protocol.
...
R=brianwilkerson@google.com
Change-Id: I95fb2c9d50096f90913c4d6670ce0841095fe6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-27 23:27:21 +00:00
Brian Wilkerson
8cf4c15bf0
Update the context location label for general type alias support
...
By the way, I didn't actually regenerate the table, I just hand edited
it. We don't have any way to ensure that the checked in table matches
what would be generated because we can't have the code used to generate
the table available on the build systems (or every developer's machine).
Change-Id: I4b645f3a276f23bab469e5daf2325cc8f2d0bce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181441
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-01-27 22:38:07 +00:00
Nate Bosch
6e1a0b08c7
Update to null safe package:html
...
Change-Id: I667efbe0f895628130bc695e96a7f95a991c2e9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181040
Commit-Queue: Nate Bosch <nbosch@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2021-01-27 18:41:10 +00:00