Commit Graph

19 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 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
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
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
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
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
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
Brian Wilkerson b23be6b8ee Update the completion metrics measurement tool
Change-Id: I8e67d138e60e0e226cef87e9efd35088526dec72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-26 23:54:15 +00:00
Nate Bosch 58e7e7eb26 Prepare for breaking change in package:http
The `url` argument is changing from `Object`, accepting either `String`
or `Uri` at runtime, to `Uri` for better static help.
https://github.com/dart-lang/http/pull/507

- Switch to using `Uri` for requests. Where sensible push this type into
  the signature of the surrounding method.
- Make some updated method private where they were unnecessarily public
  which makes it harder to have confidence when looking for usages.
  Rename a method with an unnecessary `get` name.

Change-Id: Ibf075741d6b9d292349b15f1dc84004981729aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179368
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-15 16:35:01 +00:00
Brian Wilkerson 3f2e5d8a90 Improve the output from the code completion metrics tool
This CL does three things.

First, it makes the output options more fine grained to allow us to get
the information we're after without getting information that we don't
care about at the moment.

Second, it prints the unconditional output in a more compact tabular
form so that it's easier to read.

Third, it adds support for outputing a high-level comparison of multiple
experiments to make it easier to gauage the impact of a change.

Change-Id: Iee8b1eb126de43cb08c27a1b60036090fffc0421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174941
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-03 17:14:13 +00:00
Brian Wilkerson 8fee2b96af Rename the tool/completion_metrics directory
The directory contains tools related to code completion that are not
used to measure completion metrics, so the old name was too specific.

Change-Id: Ie8745901655df6e7b29da645b3b0a48011ca9f10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174483
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-30 23:57:44 +00:00