Commit Graph

45 Commits

Author SHA1 Message Date
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
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 84cafbde9d Remove some unused code from analysis_server
Change-Id: I369a93a9d67cf6a9346e0edcc439d34a8e959e3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-04 21:13:29 +00:00
Devon Carew f5e26456bf Remove the --completion-model flag from the analysis server.
Change-Id: I6bedbb0b5c4b8bedba18d2e3b788db0a9686f6df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172026
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-16 03:31:18 +00:00
Brian Wilkerson c3f96e863f Remove uses of useNewRelevance and clean up associated code
Change-Id: I04dd3b33d229348042609c5a656d1ad68a95913d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-15 00:18:07 +00:00
Jaime Wren abde894da6 Merge the inherited_reference_contributor.dart into the local_reference_contributor.dart contributor. This fixes an outstanding bug in completion inwhich local and inherited methods were recommended in completions instead of local declarations.
Change-Id: Ie9d2b51b2b25d5537a59f73f23e3f6224190eedf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-10 14:59:27 +00:00
Jaime Wren 1e0611cfac Refactor the LocalConstructorContributor into the LocalReferenceContributor.
local_declaration_visitor.dart was updated to better implement ConstructorDeclarations

This adds the API of _recordCompletionElement() and _elementAlreadyInCompletionSet() to local_reference_contributor.dart, if this API looks good and lands, I will use it in the rest of the contributor to fix other known shadowing bugs.

local_constructor_contributor_test.dart was removed (a large copied & pasted body of tests not providing value) and tests were added at the beginning of local_reference_contributor_test.dart.  Tests in this file were also updated accordingly.

The change of the testCommentSnippets025 test in completion_test.dart is due to the framework not supporting (in a more robust way) the allowance of both a class and an implicit constructor

The addition of the testCommentSnippets045 test in completion_test.dart is to show that constructor invocations don't need the new keyword.

Change-Id: Ic4a52e3cb94320a92f24b1c743dd61e18c6c7b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-05 16:15:04 +00:00
Brian Wilkerson d6206fbbc7 Add return types to more tests in analysis_server
Change-Id: Ib85d299a34cfda6bc4772d53f16d9ba44251bfbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-30 14:30:18 +00:00
pq fd9d3f9786 relevance test re-structure
See: https://github.com/dart-lang/sdk/issues/40104

Change-Id: I79635831d92313f6c55c9a7c4a7b1fb0eeb41c06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-13 23:59:30 +00:00
Brian Wilkerson ba5c2a16bd Support completion of extension members
Change-Id: I78a59216add7ea612d77bae0d3e52a0185a682e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-16 14:30:37 +00:00
lambdabaa 8f0b6c89e2 Fix uri of dart_completion_ranking_internal_test.dart import
Change-Id: Iafaff006e6b2d52b88498d3674e854fe284ae927
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-30 00:44:04 +00:00
Ari Aye 752f06fff5 Make sure to import and run completion_ranking_test_internal.dart in test_all.dart
Change-Id: I410521737c7c7c2bd45377408769b3b6cbcb8425
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-07-29 20:41:43 +00:00
Ari Aye a650cb67f7 Make sure that completion_ranking_test.dart is loaded in test_all.dart
Change-Id: I9933282a9e137c8a3014d1698bfaf50914b72cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-07-29 17:01:52 +00:00
Brian Wilkerson 6241ea1788 Disable running a test from test_all that breaks when run from a parent directory
Change-Id: I08c45f2e54c483e0cbe4bc46a9759c019c8d3f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110743
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ari Aye <ariaye@google.com>
2019-07-26 18:22:39 +00:00
Ari Aye 5d5a0c0164 Check in token-level language model via tflite ffi
Local test run after running `gclient sync`:

ariaye@ariaye1:~/sdk/sdk$ dart pkg/analysis_server/test/services/completion/dart/language_model_test.dart
00:00 +0: calculates lookback
INFO: Initialized TensorFlow Lite runtime.
00:00 +1: predict with defaults
00:01 +2: predict with confidence scores
00:03 +3: predict when no previous tokens
00:04 +4: All tests passed!


Change-Id: I4181bea09cf8fec74d03bba4f83cd26dac818f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-25 18:39: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
Brian Wilkerson db0a8a76ae Move CompletionTarget and OpType for use by plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2924703002 .
2017-06-06 07:07:19 -07:00
Brian Wilkerson e8a5e404c3 Move LocalDeclarationVisitor for use by contributors that will be moved to analyzer_plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2918343002 .
2017-06-05 10:24:54 -07:00
Brian Wilkerson 7d26ff6d4f Remove some more library directives
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884233004 .
2017-05-17 08:02:08 -07:00
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Jaime Wren e01634bd79 Code completion progress part two of fix to https://github.com/dart-lang/sdk/issues/24254, addition of new contributor, variable_name_contributor.dart.
The completions are not yet showing up in either IDE, IntelliJ or Atom.

BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1916893002 .
2016-04-25 12:51:14 -07:00
Brian Wilkerson 338c95be8c Sort the files in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
danrubel 6188d18eec rework completion request resolve imports
* rename resolveDirectives --> resolveImports
* rework resolveImports to return list of ImportElement rather than Directive
* new resolveDirectives test
* set priority source during completion tests

This and https://codereview.chromium.org/1685653002/ fixes https://github.com/dart-lang/sdk/issues/25690

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1693933002 .
2016-02-13 23:15:52 -05:00
Dan Rubel 43ee7b5bc9 move OpType into dart folder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1523243006 .
2015-12-19 11:11:04 -05:00
Dan Rubel 0de484bb8b convert ImportedReferenceContributor to new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1526303003 .
2015-12-16 21:17:27 -05:00
Dan Rubel 3bf298760f extract InheritedReferenceContributor from imported reference contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1533613004 .
2015-12-16 16:20:53 -05:00
Dan Rubel f13460e235 rename InheritedContributor to OverrideContributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1523163004 .
2015-12-16 12:15:34 -05:00
danrubel 6464160147 move LocalDeclarationVisitor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1529653003 .
2015-12-14 20:36:57 -05:00
danrubel 5ff1ebe935 extract LocalLibraryContributor from imported reference contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1525753003 .
2015-12-14 20:31:50 -05:00
danrubel d8494d2f50 move LocalReferenceContributor to new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1528633002 .
2015-12-14 13:57:51 -05:00
danrubel 7db8d0267d extract LocalConstructorContributor from local reference contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1521753002 .
2015-12-12 10:01:22 -05:00
danrubel 3a5a2d17ee extract LabelContributor from local reference contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1514263004 .
2015-12-11 17:46:41 -05:00
Dan Rubel 7ad6c0f1f9 extract LibraryPrefixContributor from imported reference contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1517693004 .
2015-12-10 22:42:53 -05:00
danrubel e03c395a8c extract TypeMemberContributor from prefixed element contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1504223005 .
2015-12-09 07:38:20 -05:00
danrubel dcacf6145b extract LibraryMemberContributor from prefixed element contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1507303002 .
2015-12-08 15:10:32 -05:00
danrubel 088b50f8a9 extract StaticMemberContributor from PrefixedElementContributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1505703003 .
2015-12-07 17:15:14 -05:00
danrubel 55a8740ba1 extract named constructor suggestions from prefixed element contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1507633002 .
2015-12-07 11:58:39 -05:00
danrubel 9dd5b25d50 extract field formal contributor from prefixed element contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1507513002 .
2015-12-07 08:05:00 -05:00
Dan Rubel a5e4c81b7f move combinator contributor to new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1503463002 .
2015-12-04 15:48:21 -05:00
danrubel 9f033a9d94 convert uri contributor to use new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1498733005 .
2015-12-04 07:49:31 -05:00
danrubel 4379efb6b4 rework ArgListContributor to use new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1500793003 .
2015-12-03 18:00:50 -05:00
danrubel b9ad8a15e4 hook new DartCompletionContributor API into existing framework
and convert KeywordContributor to use new DartCompletionContributor API

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1471173003 .
2015-11-24 12:03:44 -05:00
danrubel 594183e0db Rework contribution sorter to use futures
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1470863003 .
2015-11-23 21:35:52 -05:00
danrubel 38cec67d03 step toward new completion API
- separate new CompletionContributor and DartCompletionContributor APIs
- revise new APIs and implementations to be Futures based
- revise InheritedContributor to use new Futures based contributor API
- remove unused classes

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1467023002 .
2015-11-23 12:50:12 -05:00