Commit Graph

6016 Commits

Author SHA1 Message Date
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 2af2f3559d Migrate lib/src/services/correction/util.dart
R=brianwilkerson@google.com

Change-Id: Ie85217c57e26fc2430e916c8b7829d64ffddc4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194210
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-07 20:52:03 +00:00
Brian Wilkerson a0f7ff92a1 Migrate the first round of completion support
Change-Id: I64ca0b7b6d3040b6e37d328ed62e75059c48ef07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194212
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 20:44:58 +00:00
Brian Wilkerson abd80dc17d Migrate some tests in server
Change-Id: Ic7b3c155529dc241f3cd3ec4cc79ee60fb4295b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194208
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 17:08:57 +00:00
Franklin Yow 03101c0c2b Update LICENSE
Changes to comply to internal review

Closes https://github.com/dart-lang/sdk/pull/45568
https://github.com/dart-lang/sdk/pull/45568

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +00:00
Konstantin Shcheglov 9db78a3b49 Migrate lib/src/services/kythe/kythe_visitors.dart
R=brianwilkerson@google.com

Change-Id: I9cf4eef071d72d2bf68043a0a7ab919cb65d3da9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194206
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 07:50:57 +00:00
Konstantin Shcheglov c5769f6604 Migrate lib/src/search/workspace_symbols.dart
R=brianwilkerson@google.com

Change-Id: I14e70698e91db02f3e49ced438668d0d903bf349
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194203
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 07:08:17 +00:00
Konstantin Shcheglov d8da40ec52 Migrate lib/src/protocol_server.dart and related.
Change-Id: Ibb1e5a53aa8ad67fa43b315880c491093b051e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-07 00:26:59 +00:00
Brian Wilkerson e066070f14 Migrate a couple of individual libraries
Change-Id: Ibb26391f59fa576a6a9a1cd29a70edbe8e4d3f15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 23:45:59 +00:00
Brian Wilkerson cf8761d37a The subset of data-driven fixes that can be committed at this point
Change-Id: I76e115efbbef1649d53d01ffdff3473446330f0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194117
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 23:36:43 +00:00
Konstantin Shcheglov 43b5d134b3 Migrate lib/src/channel/
R=brianwilkerson@google.com

Change-Id: I2748f92589ef9501325535d79188fdbb103130f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194118
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 23:16:43 +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
Konstantin Shcheglov 1469f984fc Migrate lib/src/services/search/
Change-Id: I52b2fb72952c0abacb897607d6969bedbfd027b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194114
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 22:58:25 +00:00
Konstantin Shcheglov 321a0e0246 Migrate lib/src/services/pub/
R=brianwilkerson@google.com

Change-Id: I19cd5bed18c3ae4d9fe163fd3b962550bf1344a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194111
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 22:24:42 +00:00
Konstantin Shcheglov 1bf4b0ce2f Migrate benchmark/integration/
R=brianwilkerson@google.com

Change-Id: I0dccc13831ec5aed82d33ee52ffeae1ad38c5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194109
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 21:10:33 +00:00
Konstantin Shcheglov b903d73c9b Migrate allowed status pages.
Change-Id: If81a0e66a22f9219535420041b6cd7efe1aa3341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194103
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 16:17:17 +00:00
Danny Tuppeny 65050020f5 [analyzer] Add LSP integration test for diagnostic context messages
See https://github.com/dart-lang/sdk/issues/44907.

Change-Id: I780e584a0e624aac232439d3f87cf1fb1284ef9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 16:08:47 +00:00
Konstantin Shcheglov b173c18796 Migrate LspPacketTransformer.
Change-Id: Ib0a84ae01b66e92a9406b559c1c8e4deb52ad3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 15:46:37 +00:00
Brian Wilkerson 4cba249477 Migrate a couple of additional libraries and some missed tests
Change-Id: I7c107b71a7b6226c8e294428a70656182353a048
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194018
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-05 23:01:26 +00:00
Danny Tuppeny 06729f230a [analyzer] Don't produce edits during MOVE_FILE for directives that don't change
Fixes https://github.com/dart-lang/sdk/issues/45593.

Change-Id: I4110c5a6bc4a08caff7d40cd288ae554625703e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-05 22:20:56 +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
Konstantin Shcheglov 87d9364e06 Update integration/analysis/navigation_test for non-function type aliases.
The test was passing for me without changes, but failing on bots.
I suspect that this is because of a random package_config.json on
my computer. Adding one explicitly in the test should fix it.

Bug: https://github.com/dart-lang/sdk/issues/45576
Change-Id: I0ccdca5713c4fd5aeac7732dc5736c4e8dbfea9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-05 15:24:26 +00:00
Konstantin Shcheglov 3ea23d2f55 Migrate pkg/analysis_server/test/integration/analysis/
Change-Id: I6dc636c06e13d1ac1da6caf2e33443baca08315d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194001
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-05 07:46:16 +00:00
Konstantin Shcheglov 1c25329091 Migrate more analysis_server/test/integration/ tests.
Change-Id: Idbcf7a7c628a61f23120013a113b35256c26ed25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194004
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-05 06:19:15 +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
Brian Wilkerson 99814617b0 Migrate more of server to null safety
Change-Id: I8989f5f9a45a9c832f0aeb56397fed978386ce30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194041
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-04 21:40:55 +00:00
Brian Wilkerson 34873853d8 Migrate some of the plugin support in server
Change-Id: I1294a33725ff0d0c3d2eb981c23211a8576f60f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194023
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-04 00:23:39 +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
Brian Wilkerson 0190d20bd6 Migrate some tests and test utilities in server
Change-Id: I0a37352c903bf7139af25aab255fe6a5331ce98b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-03 19:23:44 +00:00
Konstantin Shcheglov a8590a287e Remove WithNonFunctionTypeAliasesMixin from analysis_server tests, enabled by default, update tests.
https://dart-review.googlesource.com/c/sdk/+/192948 was landed.

Change-Id: If5c175af47c9b324d6ca06597a4ebc3e3541cf85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-03 05:19:42 +00:00
Brian Wilkerson 744fa0ba2d Migrate some additional libraries and their tests
Change-Id: I3aae14488fb5def205788a60b27d33211c88d330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193889
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-02 20:02:22 +00:00
Brian Wilkerson 90d42351db Migrate a few more utilities to null safety
Change-Id: I2b623713ec3a7c366f6fe7643e7c56bab54f40a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193822
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-02 17:53:32 +00:00
Brian Wilkerson 0f4943c22b Migrate some of the base test classes in server
Change-Id: I010389d51d519968ce7c1ecd8da8811d036d9ab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193830
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-02 14:53:31 +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
Sam Rawlins 5e040a20f8 analyzer: Improve span of use_of_nullable_value errors
This changes the span reported from the _receiver_ to
the _use_ (method name, property name, operator token).

I think this change is overall an improvement.
Specifically, its a great improvement for cmdline
output, where the receiver and the "use" are on
different lines.

One possibly weird change is that if the operator is `[]`,
then I only highlight the `[` character. I don't know if
there is a better place, and I think this is fine.

Fixes https://github.com/dart-lang/sdk/issues/43708

Change-Id: Ie66ddf04b4904a367575193106385dd63ee39985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-02 02:43:48 +00:00
Devon Carew bfaed5e927 Update the text for the 'in file' version of a fix.
Change-Id: If9263f567acd20d377bf661f65f051d468f4eadd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193721
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-03-31 18:04:29 +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 8c775581e2 Fix a bug in data-driven fixes handling of parameter changes
Change-Id: Ic5872a364bfcadc302ec35c0cf63ec87e5e2594b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193444
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-30 04:15:38 +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 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
Konstantin Shcheglov 92130a010e Tests for DAS services and generic annotations.
Change-Id: I063c78ae778366e60bb0d4aca55c4e7fd70f3d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193091
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-25 23:38:24 +00:00
pq 9847e7fbe6 migrate to lintProducerMap2
Change-Id: I90b41091b354f02e84772e797257bf20db404f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192949
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-03-25 14:59:04 +00:00
pq 727d90540d remove nonLintProducerMap
Change-Id: Iae2b150c2dffd8aa13197d08811eed63b707e072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192941
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 23:12:03 +00:00
pq 67cf58cde8 unnecessary_final fix support
Change-Id: I79338f2001d621b83ae4234fd4a79321836167b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-03-24 15:05:41 +00:00
Danny Tuppeny 387e9d9ab2 [analyzer] Include ConditionalExpressions in Flutter Outlines
Fixes https://github.com/Dart-Code/Dart-Code/issues/3196.

Change-Id: I369e48285329c808a092ff677440e159aa7a103b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192688
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 15:01:21 +00:00
Konstantin Shcheglov 7f3f3e66ac Skip BazelChangesTest on Windows.
Change-Id: I88259cf2d101c80b35b16bec5cdefd3dc85a5356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 21:24:01 +00:00