Sam Rawlins
73443c8603
DAS: Generated protocol 'enums' can be real enums
...
File sizes are reduced:
```
analysis_server_client's protocol_common.dart - 132k -> 102k (-23%)
analysis_server_client's protocol_generated.dart - 453k -> 433k (- 4%)
analysis_server's protocol_generated.dart - 528k -> 509k (- 3%)
analyzer_plugin's protocol_common.dart - 139k -> 108k (-22%)
```
Change-Id: I8018f1d09e053c9d3df340ba31cdb07cbd29acf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-11-07 17:27:18 +00:00
Sam Rawlins
fbf331e0dd
DAS: reformat source code with tall-style
...
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-11-06 23:04:00 +00:00
Konstantin Shcheglov
65662d45b6
Legacy. Remove 'withNullability' parameters from analysis_server/ functions.
...
Change-Id: Ibe70149b6415234861b49fdc9cad58896b55d119
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350350
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-02-06 20:19:48 +00:00
Konstantin Shcheglov
fe16f0ed0c
Legacy. Remove most '_isNonNullableByDefault' and their uses.
...
Change-Id: I299944248dabc356b0668684c09cc7a8ad53011b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350100
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-02-05 20:37:48 +00:00
Danny Tuppeny
581686b8fb
[analysis_server] Consolidate some more writePackageConfig() methods
...
+ tidy up some redundant package versions that are inherited from the ConfigurationFiles mixin.
Change-Id: I93329cbf65af3a68ed27284903e7becac01cf5ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-02-01 19:11:27 +00:00
pq
440ea59ee0
enable flutter_style_todos in server
...
Change-Id: I4921d538e1498e66c8cab2d84dfcad21d1a7b555
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335952
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2023-11-14 21:08:12 +00:00
Konstantin Shcheglov
bbc3dcbe30
Extension type. Tests for type hierarchy.
...
Change-Id: Ic0e31bb13efd68a3413429d1ff9110bb9b268e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323432
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2023-08-30 21:18:25 +00:00
Konstantin Shcheglov
25dc2147bb
Separate testFile and testFilePath in server tests.
...
Change-Id: Icc11f0c7f1642471cc01a0046e2a04801efba084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307967
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2023-06-07 23:56:09 +00:00
Konstantin Shcheglov
71ef76ddfd
Deprecate Element.enclosingElement2, use 'enclosingElement3'.
...
Change-Id: I0aba589bd42648eb420051cbe04bb3ef435081e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-08-02 18:00:14 +00:00
Konstantin Shcheglov
2f3269faa1
Deprecate 'Element.enclosingElement', switch to enclosingElement2.
...
We need this for:
1. CompilationUnitElement changes its enclosing element from LibraryElement to LibraryOrAugmentationElement
2. Similarly PrefixElement.
Change-Id: I5e3719b4ef59d03caab1b20c9172a8c0fd786bdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251900
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-07-19 15:44:14 +00:00
Brian Wilkerson
45d8c7ee4b
Stop using main in test code in more places, part 3
...
Change-Id: Ia35343f4d79037875fe154a38a3adcf8117d9369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243881
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-05-06 22:34:50 +00:00
Konstantin Shcheglov
d5269652d8
Remove 'index' from enum classes.
...
Change-Id: I7632aced8cde06c449e694c028d0e7fb2d3312df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232426
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2022-02-11 17:35:17 +00:00
Konstantin Shcheglov
0a8091f908
Change ConstructorElement.displayString to 'Class' or 'Class.constructor'
...
Change-Id: I0918cd9f97d2ec3af008f5369cbd048fc5137dc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216922
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2021-10-16 22:28:40 +00:00
Danny Tuppeny
88a41363bc
[analyzer] Support generic type aliases in available declarations
...
Fixes https://github.com/dart-lang/sdk/issues/46409 .
Change-Id: I16fe47f52254956e58cb5f034c49e1d8fa4c22c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204403
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-08-31 17:35:04 +00:00
Konstantin Shcheglov
643d68793a
Remove WithNonFunctionTypeAliasesMixin from analysis_server/.
...
Change-Id: I3b25bf726d977984552ab361baf11eed28cafd7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210651
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-08-19 22:08:24 +00:00
Brian Wilkerson
10354d0aef
Convert several of servers tests to be null safe by default
...
Sorry for the size of the CL. In reptrospect I should have changed the
defaults in any test class with failing tests and then converted them
one-by-one the way you did in analyzer. I'm happy to do anything I can
to make this easier to review.
Change-Id: I0a729d0d07cc3083a9892cfb1ddc75a06ad8f0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204748
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-06-24 04:05:39 +00:00
Konstantin Shcheglov
40856c14c1
Remove most trailing spaces in analysis_server/
...
Change-Id: Ib03564c09af974b74be893ea2d6fdf1f6669d99b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-06-02 21:50:24 +00:00
Danny Tuppeny
115a758d87
[analyzer] Include null postfix operator in display strings for code completion, signature help, etc
...
Change-Id: Iffeda6b3efa3d2bcd4c09a63ab8870b69bc155aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-04-27 18:27:48 +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
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
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
Konstantin Shcheglov
4a5ac9df57
Support for non-function type aliases in convertElement() and test navigation.
...
Change-Id: Ic2dcf6ad3faaf6712fdcbbe5197f332b6ba42e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-01-26 06:40:00 +00:00
Konstantin Shcheglov
56903e6cfb
Replace findElementInUnit(), findLocalFunction(), and findLocalVariable() with FindElement.
...
Change-Id: I508b63fee81dc087489055448debb495a06eff6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-14 23:15:25 +00:00
Sam Rawlins
f230313871
analysis_server: remove unused imports with shared prefixes
...
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: Ifd4df564247c08606841a0e22896d767da438a47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-18 17:30:21 +00:00
Konstantin Shcheglov
a074c793b8
Rename to resolveTestCode() and resolveTestFile().
...
Change-Id: I69a598c5acef86c6a59212648496569423007ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-10-27 19:35:47 +00:00
Konstantin Shcheglov
d9d7324b27
Issue 43777. Update analysis_server/ tests to run when Null Safety is enabled by default in 2.12
...
Bug: https://github.com/dart-lang/sdk/issues/43777
Change-Id: Ibd1da16b58b8304d6f1d4260615c7049fc5ffe59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2020-10-27 18:19:33 +00:00
Konstantin Shcheglov
aad1a677c0
Deprecate GenericTypeAliasElement
...
See also https://dart-review.googlesource.com/c/sdk/+/166680
Change-Id: I6018f3bf5796dcc8ab059aab5b29d01e7336581b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167727
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-10-15 16:03:26 +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
b03ef5b3fe
Convert more doc comments in analysis_server
...
Change-Id: I333d0af4444226a8152e840c4d9015fb4c30bd32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-02-13 19:29:28 +00:00
Brian Wilkerson
58a9c22f80
Add return types to more methods in analysis_server
...
Change-Id: I65bed353bcff4f991faf8c3bdde979789a8d962b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-30 21:43:34 +00:00
Brian Wilkerson
8efdee06d6
Begin adding return types in analysis_server
...
Change-Id: Id0daa52236bdc90cba6bfd7cf81d1b4cf47603c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133544
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-28 21:18:30 +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
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
da191665aa
Issue 34709. Support generic type alias (AKA generic function type alias for now) in outline and completion.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/34709
Change-Id: Ic18d98e07ba0cbd231ded27c4c32533ee013632b
Reviewed-on: https://dart-review.googlesource.com/c/84320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-13 21:20:08 +00:00
Konstantin Shcheglov
0299b98197
Renames for addPackageFile() / addPackageMeta().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I9d710d76186f5e54592457ac8708551ac096a43a
Reviewed-on: https://dart-review.googlesource.com/c/82465
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-11-01 17:24:26 +00:00
Brian Wilkerson
a6b1a99f4c
Make mixins abstract by default
...
Change-Id: I8ca672ac9d6acbb29ccea1bd41a617e0a870c74a
Reviewed-on: https://dart-review.googlesource.com/76303
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-09-25 15:45:07 +00:00
Konstantin Shcheglov
7cf078c05d
Index and search for mixins.
...
R=brianwilkerson@google.com
Change-Id: I5399507dc5a9688ee5944f6554167a6b1e8692b6
Reviewed-on: https://dart-review.googlesource.com/72525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-31 21:38:26 +00:00
Konstantin Shcheglov
1f52372bfa
Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
...
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.
Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-29 13:46:45 +00:00
Konstantin Shcheglov
eab492385c
Updates for passing / failing analysis_server tests.
...
R=brianwilkerson@google.com
Change-Id: Ica615414f567cf62bb631824f95d9ef45b8a777a
Reviewed-on: https://dart-review.googlesource.com/69003
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-08 20:47:25 +00:00
Brian Wilkerson
19a90c2c8b
More CFE tests for server
...
Change-Id: I829032909ce3c9244c8b204ca12b8aeef61e997e
Reviewed-on: https://dart-review.googlesource.com/68844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-08 15:21:50 +00:00
Brian Wilkerson
87f753dbd3
Replace some declarations of element with declaredElement
...
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2018-08-02 16:00:36 +00:00
Brian Wilkerson
1d159e7c23
Rename annotation testing methods in Element
...
Change-Id: I0f60b9abd3de350e62d89eac0d690a1db40316b7
Reviewed-on: https://dart-review.googlesource.com/45080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-05 17:23:48 +00:00
Danny Tuppeny
f1cdf5f9be
Fix up plugin/protocol_dart_test.dart for Windows paths
...
See #32226 .
Change-Id: I37362ba86188616dd1f0fd6623a62e05ee825454
Reviewed-on: https://dart-review.googlesource.com/42702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-02-21 17:39:09 +00:00
pq
3dd7eae4c8
Add @required prefix to required params.
...
See: https://github.com/flutter/flutter/issues/10219
Change-Id: If8bd55b5a3557f8c49430079b790727f7ba25217
Reviewed-on: https://dart-review.googlesource.com/41924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-16 00:13:30 +00:00
pq
1399a5f511
Sort required named params in protocol element parameter list.
...
See: https://github.com/flutter/flutter/issues/10219
I'm VERY open to other approaches. If you deem this too quick and dirty, consider it a conversation starter! :)
I was also a bit unsure of where best to test this so by all means let me know if it should go elsewhere.
Change-Id: Ic4a271d9db7597ae7ee72f5b60728968202f954e
Reviewed-on: https://dart-review.googlesource.com/38346
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-05 17:38:25 +00:00
Devon Carew
2b3b0272c4
Switch to using specific throws calls instead of general throwsA() calls.
...
Bug:
Change-Id: Id604dca1b8c3060c1d12c9ed0b1493771d2eb0d6
Reviewed-on: https://dart-review.googlesource.com/5883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2017-09-14 18:04:44 +00:00
Devon Carew
b12d010064
Remove the use of deprecated package:test API.
...
Bug:
Change-Id: I671678117f72efac5efd60d7b4e459dffcce47c6
Reviewed-on: https://dart-review.googlesource.com/5542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-13 21:55:00 +00:00
Konstantin Shcheglov
00d5012906
Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...
...instead of mixing formatting with actual changes in many CLs.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Konstantin Shcheglov
ee4a09faea
Fix for element_search.dart import in analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975473002 .
2017-07-06 12:38:56 -07:00