Commit Graph

4182 Commits

Author SHA1 Message Date
Konstantin Shcheglov c07b1fea98 Add relevanceBoost for initializers of variable initializers.
R=brianwilkerson@google.com

Bug: https://github.com/JetBrains/intellij-plugins/pull/665#issuecomment-525052795
Change-Id: I254639a1582ca5691e96e15612bd2078c65e0b41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114969
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-29 20:25:26 +00:00
pq ea09fbe45d switch case statement completions
follow-up from: https://dart-review.googlesource.com/c/sdk/+/114748

Change-Id: If92ac6e67298e8950d7da57c0d1892cb29ae8c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114756
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-08-28 23:26:45 +00:00
pq 851701d2a4 add BREAK suggestions to switch cases
fixes: https://github.com/dart-lang/sdk/issues/36605

Change-Id: I29e3b6a46c542895995b5eedcc64262352bb49a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114748
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-08-28 20:27:51 +00:00
Brian Wilkerson 91400d6422 Guard against an NPE when computing completions (issue 38006)
Change-Id: Ica0a9cf3eecd765db8e9ebaab560f59275f3c345
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-27 21:21:53 +00:00
abykov2 e5b0ff494b Adding an offset field to TokenDetails to return token offset as part of listTokenDetails
Closes #38013
https://github.com/dart-lang/sdk/pull/38013

GitOrigin-RevId: f384b20a96950238a50a95420b264100de5bbbe4
Change-Id: Iabca2d4ac89f07424439ab5bba2156860aab2c81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114587
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alex Bykov <abykov@google.com>
2019-08-27 17:52:38 +00:00
Konstantin Shcheglov 605709ac31 Fix _isDynamicExpression() in DartUnitHighlightsComputer2.
The staticType of an "expression" can be `null` if it is not really
an expression, e.g. an import prefix, or a name of an extension.

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

Change-Id: I9eb328453e77fa51ff0f2d289972ad1274a9a5e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114558
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-26 21:54:52 +00:00
Konstantin Shcheglov e18ebb610b Set relevance tags for constructors.
R=brianwilkerson@google.com

Bug: https://github.com/JetBrains/intellij-plugins/pull/665#issuecomment-523843326
Change-Id: I347822b84311ed2b94171231597aeceebd900015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-26 20:36:01 +00:00
Konstantin Shcheglov 67d8bb4c24 Add 'Rename Extension Member' refactoring.
R=brianwilkerson@google.com

Change-Id: Ifba22e28e27ee1d29959db27da1fa1cc7a47e4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114546
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-26 19:44:35 +00:00
Konstantin Shcheglov da66bf6f77 Issue 37951. Identify widgets in IfElement and ForElement.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/37951
Change-Id: I67efef667227c43749b63e4b4c53f6f517edf43d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-26 16:34:15 +00:00
Jens Johansen 74e09abc6e [CFE] Remove/move file that wasn't needed by frontend; cleanup pubspec.yaml a bit
Change-Id: I204b844e7f1cb892a529bca3a13017ed836275f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114074
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-23 07:42:03 +00:00
Konstantin Shcheglov 2b31e41564 Remove 'docComplete' and 'docSummary' from AvailableSuggestion.
They contribute to much size of available suggestions, and not
used in IntelliJ.

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

Bug: https://github.com/dart-lang/sdk/issues/37816
Change-Id: I9c28020dc528980ee9efef3820c2acf679405ca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-22 20:16:46 +00:00
Paul Berry 51cd16ecf0 Flow analysis: support for and for-in elements in collections.
Change-Id: Ia73c68c2b8a57c62ce2b4984184cf8a712b554af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113944
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2019-08-21 21:57:54 +00:00
Konstantin Shcheglov a17959b5a0 Log the context in which analysis work is done.
R=brianwilkerson@google.com

Change-Id: Idb8c1296917053e802442ac87e8aa9e2fae0dee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-21 21:33:24 +00:00
Paul Berry 4bf5a72ca0 Flow analysis: support functions whose bodies are expressions.
Change-Id: I01a66fb2c897e0cabbdfb4b7423cab53291b3adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113947
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-21 20:41:13 +00:00
Konstantin Shcheglov af2e729fca Record request / response statistics.
If following flags are specified for DAS, in IntelliJ in Registry as
"dart.server.additional.arguments":

--new-analysis-driver-log=file:/Users/scheglov/tmp/das.log
--include-protocol-to-driver-log

then abbreviated requests, and request execution statistics is
written to the file. We also write abbreviated notifications.

The goal is to be able to see what work was requested, what was
analyzed, and identify why some requests took long to get responses.


R=brianwilkerson@google.com

Change-Id: I98e99a73f10f2842c5efb350189a9675f29f45df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-21 16:47:21 +00:00
Konstantin Shcheglov 6408a9cc4d Tweaks for writeType() and summary2.
R=brianwilkerson@google.com

Change-Id: If3c682f3dfc12a9e13d805bc25476b16249c7754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113273
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-17 07:28:52 +00:00
Brian Wilkerson b40b301564 Add more extension completion tests and fix a bug they uncovered
Change-Id: I3e89eed886e3100e2d1942e38b124f99bebd6b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113385
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-16 19:39:45 +00:00
Konstantin Shcheglov 8280a31ef0 Fix CREATE_LOCAL_VARIABLE for function typed variable.
R=brianwilkerson@google.com

Change-Id: If9ecaa595e36ec8f3c9ff112acb235a03372248b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-16 17:49:15 +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
Brian Wilkerson 4f9293962b Add a navigation test
I wrote the test to debug why navigation wasn't working for me in the
editor, but the test passes. I think it's worth capturing the test.

Change-Id: Ieb4c6380dcd07fbec67d6b508d97087303c428ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113212
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-15 20:23:52 +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
Brian Wilkerson 802937e5a6 Add support for completions inside extension (and mixin) bodies
Change-Id: I549e91ac7a8e293ea6592043988a67a2da680620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113133
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-08-15 16:39:05 +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 37a483ef78 Set incorrectly referenced static element, and test CHANGE_TO_STATIC_ACCESS.
R=brianwilkerson@google.com

Change-Id: I8d479ccd17fc3f6429d7fa17bc4e78955194095d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112935
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-14 00:33:06 +00:00
Ari Aye 3cc20cd185 Remove quotes from suggestions coming out of model when completion is requested inside of quotes
There's an issue right now where accepting string literal model completions inside of quotes
will produce duplicate quotes.

Bug: https://github.com/dart-lang/sdk/issues/37820
Change-Id: I7c2f280c8050bd583c4ab49bf97f86fec3df6d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112749
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-13 18:54:40 +00:00
lambdabaa d19a590687 Extract the lexeme from included suggestion tags when correlating with model results
Make sure that we're comparing model lexeme to analyzer lexeme since https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart#L226.

Change-Id: I01d93623fb09ecc169be92674b58a91ef0bf56ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112263
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-07 20:40:55 +00:00
Danny Tuppeny 31cd2bd75a Ensure LSP completion filterText doesn't include '()' or '(…)'
Change-Id: I01c380ee3a36dbdd15706cb55b108899cacd9fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112249
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-08-07 15:25:40 +00:00
Konstantin Shcheglov e04dc4dd63 Update statuses and expectations with summary2 for some tests.
R=brianwilkerson@google.com

Change-Id: I48eeb07a5423bb35512b4b583a9b2a942cb2d83a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-06 17:42:39 +00:00
Konstantin Shcheglov a62de52d04 Insert new named arguments before 'child' or 'children'.
R=brianwilkerson@google.com

Change-Id: Idbe5bb7efbeaa81a8f2319fab929944e7b3492d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112027
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-06 01:31:27 +00:00
danrubel 8b2993568e implement dartfix --pedantic
This CL adds a new --pedantic option to dartfix for applying all fixes
marked as pedantic. In addition, this addresses comments in
https://dart-review.googlesource.com/c/sdk/+/111840

Change-Id: Ia2e7a792911f19edb698c126c8fd77cd8f8f77cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-05 20:18:05 +00:00
danrubel 1c5911982e add includePedanticFixes flag to dartfix protocol
Change-Id: I43c40eacf038beed6245ec873e746dcbb1ed80df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-05 20:18:05 +00:00
Konstantin Shcheglov cdf6103b38 Support for free-form 'expression' in FlutterWidgetPropertyValue.
Also add ENUM_LIKE property editor, that is like ENUM, but allows
such free-form expressions.

R=brianwilkerson@google.com

Change-Id: I3910b6bea98110c192b6cc9fb716b73270e1d97c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111985
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-05 18:43:29 +00:00
Danny Tuppeny 3011ca2da7 Include "import function" fixes for UNDEFINED_IDENTIFIER
Change-Id: I66ad76e82f419ed19ca8e47574d1ec8335571bd5
Bug: https://github.com/Dart-Code/Dart-Code/issues/1898
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111738
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-08-05 16:27:07 +00:00
Brian Wilkerson f8f77eb4c0 Add keyword completion suggestions
Change-Id: I2ec6de7a68397aa9e43b155db52c5473e3d7035d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111667
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-02 15:09:01 +00:00
danrubel fc5b4e3cef Rework dartfix lint fixes to remove race condition
This refactors the way that dartfix finds lints to fix to be based on
error codes rather than manually running the lints. This prevents
a race condition that occurs between calling setAnalysisRoots and
requesting fixes.

Fix https://github.com/dart-lang/sdk/issues/37558

Change-Id: I35817a9b152a28db9e78662a5ea5096f275f68bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-02 02:04:57 +00:00
Brian Wilkerson 86bdb3e3fa Clean up some warnings in analysis server code
This also sorts the content of these files. The analyzer team uses the Sort Members function on all of the source code in our packages.

Change-Id: Id0700954aefe63f6c7d2e43df021997f95ad7e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111663
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 21:24:00 +00:00
Konstantin Shcheglov 6a4d805df4 Implement 'Import Library' quick fix using DeclarationsTracker.
This reverts commit 143e5ef556.

Change-Id: I3c575ff690fd8c8d93a90e50a451a6ec993c4164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111305
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-31 22:14:21 +00:00
danrubel 3f22f1f5df do not include double-to-int fix by default
This changes the default fixes applied by dartfix so that it no longer
converts doubles to ints by default. The fix can still be applied
by specifying '--fix double-to-int' on the command line.

Change-Id: I751a42a9c6ae6589259e0b7ac5c769fd4efc4313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-07-30 18:05:50 +00:00
danrubel 8dc24d0919 report dartfix error for unknown fix
Change-Id: I0ebc73423d46ad5c07f4755847fe2ec68020428f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-30 18:05:50 +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
lambdabaa fc82ed2286 Isolate-based CompletionRanking
Screenshots: https://i.imgur.com/IOLKOCU.png, https://i.imgur.com/dM9VsNr.png

Change-Id: Ieae0f9066b7a349bb4adff6b327b67bcae49aab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-29 13:45:23 +00:00
Konstantin Shcheglov ec5bf35152 Update analysis_server and analyzer_plugin to stop using DartType.isSubtypeOf().
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: If7365bd82b97bd692af9508697307976ea7c69e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110881
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-29 00:19:37 +00:00
lambdabaa a9ebb5c3c8 Enable running language model unit tests on windows
Change-Id: I63457934fcd23510f6a2848fbb00361ebb40a40f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-07-27 20:57:59 +00:00
Brian Wilkerson 306a592fe4 Add a test for hovers now that doc comments are preserved
Change-Id: I7ee4397bcbf328aa41e96cd444470eb6fcaa7dbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110768
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-07-27 14:06:38 +00:00
Brian Wilkerson e57b7f2101 Update member sorter to sort extensions
Change-Id: I710123e389adfdd5191ff7538be17982d8f3630c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110767
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-07-27 14:06:30 +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
Brian Wilkerson 8b81bb8115 Remove some unused imports
Change-Id: I516b544b3bdff07e67f444024789093907369959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110760
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-07-26 16:32:01 +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