Commit Graph

135 Commits

Author SHA1 Message Date
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 54fc28ec25 Migrate remaining unblocked tests
Change-Id: I30e3c22db7df6e78be88125f20eea2dce054f446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-19 15:57:38 +00:00
Brian Wilkerson 02d50e7ebf Migrate several test classes
Change-Id: I7477d5c42a8c2f953c51aca7ab6fff8b6fc930f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-19 00:38:19 +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 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
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 d373094cbb Test that search of/in non-function type alias works.
Change-Id: I4d750da4a706d837d626349ad4225f80d35c3f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-26 16:08:39 +00:00
Konstantin Shcheglov 861879fad4 Issue 44196. Change ExtensionElement.displayString to the empty string for unnamed extensions.
Bug: https://github.com/dart-lang/sdk/issues/44196
Change-Id: Idcd6b2caa6efa37350a518d229768e9ab3e24599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-13 21:44:24 +00:00
Mike Fairhurst 1134a0f17c [analysis_server] Remove unused dart:async imports
Change-Id: I764ee78cb9e31bdb3abaa36ca4754e1fed180311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161447
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:29:52 +00:00
Brian Wilkerson 9eff98594f Cleanup unnecessary references to experiments that are enabled by default
There's a good chance that I missed some references, but this should
clean up a significant number of them.

Change-Id: Ib0c93d2505d850903315c93979eca40244ab1585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147048
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-07 18:42:48 +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 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 5584c96fde Enable prefer_single_quotes in analysis_server
All of the changes except in the analysis options file are from dartfix.

Change-Id: Icd9bf02ad07f71d1fc365979c7dfe18a792dc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 17:52:52 +00:00
Konstantin Shcheglov 301a3a28c7 Fix incorrect .packages files in DAS tests.
Change-Id: I983e57113aba7add2f5b352d04fbd3aefe6316a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-14 00:54:43 +00:00
Brian Wilkerson e5705943d8 Enable prefer_conditional_assignment in several packages
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.

Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-06 05:19:19 +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 84a8a2db33 Issue 39192. Fix codeLength / codeOffset, store it into the cached data.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/39192
Change-Id: I17fe30839dd8a51c047103e028eea145ced1ec87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123689
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-31 20:03:58 +00:00
Konstantin Shcheglov a389015083 Rewrite MethodInvocation to FunctionExpressionInvocation when the target is not a method.
Failing tests for DDC are tracked in the following issue:
https://github.com/dart-lang/sdk/issues/38749

Change-Id: I96e0fe9bc87509b99ba982be4572d4ad4f133cca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120342
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-08 00:22:39 +00:00
Konstantin Shcheglov 595022bdea Remove summary1, part 1.
Change-Id: I557785ac13fa411280ce032324b0305bf25a0a6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119170
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-28 14:30:05 +00:00
Brian Wilkerson 5f824e572d Return extensions from search.topLevelDeclarations
Change-Id: Iaa6ccbf9f0b1060148d81ff96670315aa7ae73e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113209
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-15 19:18:03 +00:00
Konstantin Shcheglov 9776e3699f Tests and fixes for searching extensions and extension members.
R=brianwilkerson@google.com

Change-Id: I6fda5fd473f9a215d29024eb315af702a11bce42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112931
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-14 01:36:46 +00:00
Konstantin Shcheglov d57ebb0e1c Fix reporting FLUTTER_GET_WIDGET_DESCRIPTION_NO_WIDGET.
R=brianwilkerson@google.com

Change-Id: Id4d84ab6240b4eb9444201c7cb7fca5d1743dacc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109552
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-18 21:55:00 +00:00
Konstantin Shcheglov 2c4a2237d2 Disable search.getDeclarations with summary2.
It is unlinked summary based, we don't support it with summary2.
So, to not crash we return the empty list.

R=brianwilkerson@google.com

Change-Id: Ic220ae3526a3a3e2f06c60b4e25d7e7cef69af60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-01 18:21:48 +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 215e80eb0a Fix Analysis Server tests on Windows bot.
R=brianwilkerson@google.com

Change-Id: I0afc4ee40d8b1030bbcfc35bfb43a13d2db3accd
Reviewed-on: https://dart-review.googlesource.com/77266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-01 01:09:28 +00:00
Konstantin Shcheglov c5d77d1d8b Support mixins in more places in index and search.
R=brianwilkerson@google.com

Change-Id: I523726e1c7f5efa2d6e2f4b91204da3f14f181b6
Reviewed-on: https://dart-review.googlesource.com/75120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 17:40:16 +00:00
Konstantin Shcheglov 7a7ab6410d Resolve using mixin(s) in 'with' clauses.
This also allows searching for mixin(s), which we test now.

R=brianwilkerson@google.com

Change-Id: I6c1944db0e6ecbc0f7352188968e53ef38603426
Reviewed-on: https://dart-review.googlesource.com/72554
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-04 01:02:13 +00:00
Konstantin Shcheglov 0fae13e6bf Support for mixins in search.getElementDeclarations.
R=brianwilkerson@google.com

Change-Id: I88e90159ae28a2585fdbaacca2c4caab15891b83
Reviewed-on: https://dart-review.googlesource.com/72523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-31 20:19:18 +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
Brian Wilkerson 978f12c17f Use void in place of Null in analysis_server
Change-Id: Ifef805cb3c0111e237a6147f71a968958d5651e5
Reviewed-on: https://dart-review.googlesource.com/69560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-13 13:16:53 +00:00
Devon Carew 4c659e9f83 Have --use-cfe contribute to the driver signature.
Change-Id: Ica21f166bde60e41e19c3e6ab49e05a29540b0b0
Reviewed-on: https://dart-review.googlesource.com/69320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-08-10 18:11:41 +00:00
Konstantin Shcheglov 6f9073bb9d Wait for Analysis Server errors only while waiting for a response.
Change-Id: Ifd07293322b69cc9bab98e3698d63249b62abdb0
Reviewed-on: https://dart-review.googlesource.com/69242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-10 00:34:48 +00:00
Brian Wilkerson 83aa463fac Enable a few more server tests under CFE
Change-Id: I5f0bd750d3da7658f836e45f02da5ef157e752ff
Reviewed-on: https://dart-review.googlesource.com/68960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-08 17:13:28 +00:00
Konstantin Shcheglov cb4f5b3a3a Resynthesize nameOffset for properties/parameters.
R=brianwilkerson@google.com

Change-Id: Ib3213529836df20f580a5d8805006ba13b82bf20
Reviewed-on: https://dart-review.googlesource.com/68761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 21:54:55 +00:00
Brian Wilkerson 95d1ebd9f0 Fix one cause of timeouts in tests
Change-Id: I8514c7a1e89c69bbbf11882fa734903cd7c7569c
Reviewed-on: https://dart-review.googlesource.com/68430
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-06 16:08:05 +00:00
Brian Wilkerson b83072cf7d Clean up use of callFailingTest
Change-Id: I00ed46b48c03038825d62e1d9bac355bbe2354a7
Reviewed-on: https://dart-review.googlesource.com/68380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-03 17:29:37 +00:00
Brian Wilkerson 92ae73b6d8 Fork the remaining subclasses of AbstractAnalysisClass
Change-Id: Ie3e561a6b6f4d29510f543d616998c795fd85191
Reviewed-on: https://dart-review.googlesource.com/68120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-02 17:43:58 +00:00
Brian Wilkerson ea0468dff4 Fork more server tests to run under CFE
Change-Id: I7addca0b708e0b0dbb28e60619ea0bc2c20711af
Reviewed-on: https://dart-review.googlesource.com/68001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-02 12:39:46 +00:00
Devon Carew 710530c640 Update deprecated uses of package:test's isInstanceOf.
Change-Id: I0789ad89f2a247a17c472d74ca16885c5b8b6d5c
Reviewed-on: https://dart-review.googlesource.com/63320
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-30 00:08:44 +00:00
Konstantin Shcheglov 1a185867a9 Search for element declarations in discovered available files.
R=brianwilkerson@google.com

Change-Id: Idb8d4528aa1edffe60db63067e3d42fd89058b6b
Reviewed-on: https://dart-review.googlesource.com/57700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-31 17:38:53 +00:00
Konstantin Shcheglov d49af06ce0 Fix for searching references to named parameters in hierarchy.
R=brianwilkerson@google.com

Change-Id: I932eae1a1c6e440fab2034bffc7ec850f1216b9c
Reviewed-on: https://dart-review.googlesource.com/55841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-18 00:08:38 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Konstantin Shcheglov eea08cfabe Add optional 'file' for getElementDeclarations.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32461
Change-Id: I0fa5ab2165e24f5b17ecc20ad8f97471389c8b8f
Reviewed-on: https://dart-review.googlesource.com/45761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-08 19:10:47 +00:00
Konstantin Shcheglov 75858ec680 Add optional 'parameters' field to ElementDeclaration.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: I6b8e4417e7a7bc32537fdcbaa8fd04caf18da052
Reviewed-on: https://dart-review.googlesource.com/43885
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-27 01:27:37 +00:00
Konstantin Shcheglov 199206a735 Implement support for 'pattern' and 'maxResults' in getEElementDeclarations().
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: I38a53c44016d01e2012b2e20173e0ae07cc658e2
Reviewed-on: https://dart-review.googlesource.com/43883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-26 22:48:20 +00:00
Konstantin Shcheglov 586c183904 Add code range to ElementDeclaration.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: I6e7afe3b8ea8191d737c717b753d55d2a7945a81
Reviewed-on: https://dart-review.googlesource.com/43840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-26 20:37:44 +00:00
Konstantin Shcheglov 9b71ba7f17 Copy 'className' field into the API structure.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: Ie95f4b59dfa15fc085694317883b0c2fd81c1fbb
Reviewed-on: https://dart-review.googlesource.com/43160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-22 18:40:37 +00:00
Danny Tuppeny ddf36c26c9 Fix GetTypeHierarchyTest on Windows
Bug: https://github.com/dart-lang/sdk/issues/32226
Change-Id: I57a1ebf7481e17d8cdd7be8d69c3ac84d0fcc185
Reviewed-on: https://dart-review.googlesource.com/43000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-02-22 17:02:33 +00:00
Konstantin Shcheglov fa82626405 Implement 'search.getDeclarations'.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: I8bf18a15bdc7a761614849cdb32ad9361238289b
Reviewed-on: https://dart-review.googlesource.com/42586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-21 15:54:33 +00:00