Commit Graph

3370 Commits

Author SHA1 Message Date
Brian Wilkerson ffbd2eb7ee Address comments from an earlier CL
Change-Id: I6a47cb76e6babeea422791fb6b1887dd244c2f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-11-13 17:10:09 +00:00
Johnni Winther 6ed0fcaa12 [analysis_server] Remove last dependency on front_end+kernel
Change-Id: I0a8d1692ac1c8297bc7848a3f37fe97f8a8d3b29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123735
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-11-13 10:07:48 +00:00
Konstantin Shcheglov c9ef7cc5e3 Deprecate Member.baseElement, use Element.declaration in analyzer.
Change-Id: I91d23558c7d0bd8ffa2e251e5d615d4e026923b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124940
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-12 22:35:07 +00:00
Paul Berry 12265c4e42 Hacky prototype of how to fix the seventh item from #39247
The issue is:

  lib/src/logger.html, line 107, inserted !:

  In this case the single reason detail reads "node with no info (type(2171))" with no destination.

The problem is that InstrumentationInformation.nodeInfoFor is only
considering a limited set of possible sources of nullability nodes
(the primary nodes of decorated types passed to the instrumentation
listener methods `implicitReturnType`, `implicitType`, and
`implicitTypeArguments`).  It needs to also consider decorated types
passed to `explicitTypeNullability`, `externalDecoratedType`, and
`externalDecoratedTypeParameterBound`, and it needs to walk these
decorated types recursively to discover all the nodes they point to.

Additionally, the logic in InstrumentationInformation.nodeInfoFor is
inefficient; it walks through all the implicit types in every source
file, which means that it is O(N) in the size of the code being
migrated.  Since it is called O(N) times, this is an overall runtime
complexity of O(N^2).

I've prototyped a possible fix using an expando to compute
NodeInformation for each node once at the time it's reported to
instrumentation.  This is incomplete and intended as a starting point
for discussion.  Work that still needs to be done:

- We don't produce a sensible description string for nullability nodes
  associated with AST nodes, so we present unhelpful text to the user
  like "A nullable value can't be used as the explicit type ???"; it
  would be nicer to say something like "A nullable value can't be used
  as positional argument 0 of Level.>=".  We may want to consider
  modifying the instrumentation API to make it easier to generate a
  useful string here.

- I haven't verified that the description string we produce for
  external decorated types is helpful.

- I haven't verified that the we produce a useful link for external
  decorated types.

- We should probably get rid of the data structure
  NodeInformation.explicitTypeNullability (which has similar
  inefficiencies) and change over code that was using it to use the
  new approach.

Change-Id: I2cf2fe47cd70d7e5cc6e3da309851288668e8a62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124902
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-12 22:18:01 +00:00
Mike Fairhurst 942419e6ba [analysis_server] Funnel sendServerErrorNotification through logException
Change-Id: I266a8b3c404da8c9892aa6e1a49e1f1c9bdcf530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-11-12 21:45:24 +00:00
Mike Fairhurst 26cabb72c3 [analyzer] Add [SilentException] where previously not reported to users.
New errors *not* changed to silent exceptions:

https://dart-review.googlesource.com/c/sdk/+/123328/9/pkg/analyzer/lib/src/dart/sdk/sdk.dart
https://dart-review.googlesource.com/c/sdk/+/123328/9/pkg/analysis_server/lib/src/analysis_server_abstract.dart

These seem worth keeping.

Change-Id: I534b07f6cf50c5b251867b647ed6df96a9134c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-11-12 21:37:49 +00:00
Devon Carew d355778418 [analyzer] rate limit the crash reports we send
Change-Id: I9f6af7fbcec653a2a9396d1098bea678777d4b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124761
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-11-12 21:37:22 +00:00
Brian Wilkerson 667f77ed60 Add an http server for the interactive preview mode
Change-Id: I727cc2b3d393b426f09a06e7b89c115864581962
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-11-12 17:39:22 +00:00
Brian Wilkerson 63c67a6768 Ignore zero length regions in the preview tool
The zero length regions are being produced when server indicates that
navigation ought to target an unnamed constructor, a closure, a library,
or any other unnamed element. This might be a bug in server's navigation
support, but I don't want to have to fix that before the preview tool
can be used in a UX study.

Change-Id: I35c9978d38937006ee00d76516f3ee607fca6850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-11-12 14:34:28 +00:00
Konstantin Shcheglov 6cde7ce224 Deprecate synthetic FunctionTypeImpl constructor.
Change-Id: I7c2f834d7e9e532709b3d43b348e7588be659af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124595
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-11 19:38:53 +00:00
Devon Carew be2866b9b1 [analyzer] update lib/crash_reporting.dart
Change-Id: Ie3b3ffc8a0e0351341f28ff26bbb3c82deb0b5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124640
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-11-08 23:29:58 +00:00
Brian Wilkerson e3e0ef8548 Make explanations for unchanged types optional and disabled by default
Change-Id: I653f5ed1807cef7b444e014d8629bc8ef772f6f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124588
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-11-08 20:20:48 +00:00
Janice Collins 0957c13054 Check for null before dereferencing constraint text.
Bug: https://github.com/dart-lang/sdk/issues/38839
Change-Id: I63104ec32d871a61f7e5f65e605ea01faf0d2aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2019-11-08 16:41:08 +00:00
Paul Berry 7e8e66016a Migration: do not use always or never in already-migrated types.
Previously, when the code being migrated referred to a nullable or a
non-nullable type in an already-migrated library, we would use the
`always` or `never` graph node to represent the nullability of the
type.  This was problematic, because it made it difficult for
instrumentation to pinpoint precisely which element in an
already-migrated library was the cause of an expresion being
null-checked, or a type being made non-nullable.

We now create a fresh nullability node for each non-nullable type
coming from already-migrated code, with an edge to `always` or `never`
to ensure that the fresh node has the correct nullability, so that
instrumentation can see precisely which element it came from.

Since the migration tool doesn't traverse the ASTs of already-migrated
code, we can't report an AST node that caused such an edge, so an
`element` getter has been added EdgeOriginInfo to allow us to report
the element that caused the edge.

As before, types associated with already-migrated code are reported to
instrumentation via InstrumentationListener.externalDecoratedType.  As
a new enhancement, bounds of generic parameters in already-migrated
code are reported to instrumentation via
InstrumentationListener.externalDecoratedTypeParameterBound.

Change-Id: Ided4e96e2920f8d9062688f5a6fda29b9b71dd12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-11-08 13:53:17 +00:00
Mike Fairhurst e68ca9b652 [analyzer] move crash reporting to server because telemetry isn't pulished
Change-Id: I8fb293632267e7991c578076a43bfbd277fc1ee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-11-07 22:19:07 +00:00
Mike Fairhurst 5134490b78 [analysis_server] add crash reporting
Change-Id: I8005e87f75eecb0e8320d6db124256c8c7c509d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123549
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-05 21:07:33 +00:00
Mike Fairhurst 1d774abeea [analysis_server] Remove old crash reporting
Change-Id: Ib725b678dc0c9aa1ec0afec68d586690942c872b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123486
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-11-05 20:55:33 +00:00
Mike Fairhurst 7ba5584c2e [analysis_server] Fix outdated desin Service->Server, use Service->Logger.
Also multiplex the service rather than the logger, so that we can
multiplex a crash reporting instrumentation service with a file logging
instrumentation service.

Change-Id: I7720c55e26225c27d2d9447a0156b2ca83da6598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122100
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-04 21:31:26 +00:00
Ari Aye 5bae0f23cf Increase completion model token lookback to 100
In moving to a pointer mixture network from a traditional language
model I had initially decreased model lookback to 50 tokens to
facilitate faster model training iteration. Now that we've landed
on a configuration that works well, increasing lookback to 100 tokens
improves accuracy further.

I also went ahead and followed a recommendation from Jacob to
oversample Flutter sources since they're greatly underrrepresented
in our training corpus compared to our users' code at prediction time.

Change-Id: I885ddb606270394198f3aca2554e381f4465bdae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-11-04 18:00:16 +00:00
Brian Wilkerson f1fd342f71 Initial sketch of a preview site
Change-Id: I83d8ced7ece839c06deb85968446ff15bc031af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124020
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-11-04 16:59:26 +00:00
Sam Rawlins 9fd4d468b2 NNBD i13n: Temporary fix in order to migrate path package
Change-Id: I72c003742b17cf75a553a89cf8772272de9aa9d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123881
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-11-01 15:34:52 +00:00
Johnni Winther 00c2962db8 [cfe+analyzer] Move messages, scanner and parser to package:_fe_analyzer_shared
Change-Id: I4fa87aee65f30a9868a6cf8f0342591869ece7ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-01 09:37:57 +00:00
Mike Fairhurst 924ec34e01 Remove analysis logger, replace with calls to InstrumentationService
Change-Id: Ifddd58b731aa0af8f76a91261757997dc52a9fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123328
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-31 21:26:44 +00:00
Brian Wilkerson f78e5463c9 Clean up server code to remove a lint
Change-Id: Id7ccca9e2f11580c1a9263ad59c1f9279d89bada
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123740
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Ari Aye <ariaye@google.com>
2019-10-31 16:42:33 +00:00
pq fde7cbf293 support type params in stateful widget conversion
Open question:

Should we generate:

`class _MyWidgetState<T> extends State<MyWidget<T>>` ?

Fixes:  https://github.com/flutter/flutter-intellij/issues/4033


Change-Id: Ieffbb56d84a645f84661b2160eda14957c1539f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123507
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-30 23:13:55 +00:00
Konstantin Shcheglov fb362b54a7 Stop using FunctionTypeAliasElement.parameters/returnType in analyzer.
The goal is to stop implementing FunctionTypedElement in
FunctionTypeAliasElement, and keep only TypeParameterizedElement.

For some time we will have to keep implementing TypeDefiningElement, it
is used currently as a marker for top-level declarations.

Change-Id: I0062aaa66861a4d7dd5337eb9a44338ad49f5901
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-30 21:36:33 +00:00
Brian Wilkerson f49713a1ee Improve display of non-migrated code
Change-Id: I3eb0ff1099c453facfa911f81068852fbd13f535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123485
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-29 22:48:31 +00:00
Brian Wilkerson 85f87f8589 Fix a cast exception in the FixProcessor
Change-Id: Iad9b566c9a9acfe38dc7248630982abb249d8a82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-29 17:16:54 +00:00
Brian Wilkerson c0163f15a5 Add an optional port to the dartfix request to allow changes to be previewed
Change-Id: I6f7a8f880883195fd6558f5533f82da416c777bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-29 17:16:34 +00:00
Konstantin Shcheglov b085f71a35 No need to create ConstructorMember for superType constructors.
Change-Id: I945eb05d56957dae657a6d86b07642ff00196253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123334
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-29 16:23:29 +00:00
Ari Aye 805989b7cd Use includedElementNames to choose between server and client suggestions
In the case where model doesn't find a CompletionSuggestion or
IncludedSuggestionRelevanceTag we previously created both in case
the client was holding a matching token in its cache. Now we instead
apply a contains check to includedElementNames and will create
an IncludedSuggestionRelevanceTag if a token exists client-side.
Otherwise we will create a CompletionSuggestion.

Bug: https://github.com/dart-lang/sdk/issues/37797
Change-Id: I558734b65d38d8833c414a4c2cc584d0a6d15b28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-10-28 19:03:35 +00:00
Konstantin Shcheglov 32a9a5f181 Add '--enable-experiment' to DAS.
Bug: https://github.com/dart-lang/sdk/issues/39103
Change-Id: I37e1897efd044143fd9c2c96611cfa38efc056c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-28 16:17:03 +00:00
Mike Fairhurst a3ca5c3c54 [analysis_server] remove session id from connected params
Change-Id: I313d3f0b0c5df2148a3cbceddd4db54fecdc74a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122082
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-10-25 23:14:53 +00:00
Konstantin Shcheglov 567df45660 Issue 37797. Provide CompletionRanking with includedElementNames.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/37797
Change-Id: I9626147e360195de2cd71d73ebe68c157547298e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122962
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-25 19:07:37 +00:00
Konstantin Shcheglov 80b0aaf9b8 Deprecate FunctionTypeAliasElement.instantiate2(), replace with instantiate().
Change-Id: Iead94143fb3d02536309e464039493981cf853d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122965
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-25 14:38:50 +00:00
Ari Aye 5edeee8907 Transform hexadecimal numbers coming into model to <num> like we do for decimal numbers
Not hugely important since hexadecimal usage is very low in Dart in general, but
this is consistent with the transformation we apply at training time.

Change-Id: I45875fd46cd172374acba14251a8d86264339c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
2019-10-24 21:45:07 +00:00
Ari Aye f2e2b3257b Fix code completion performance regression introduced by pointer mixture network
Latency had grown to over 100ms and after this change we're consistently
under 100ms https://i.imgur.com/CCo0iQa.png. In addition, I was able to reduce
the number of isolates to two from four, lowering the memory footprint of model.

The biggest change is that we're moving from taking a map of size |V| = 100k
like {"foo" => 0.2, "bar" => 0.3} and sorting it to find the top n completions
to simply filtering / selecting lexemes with probability greater than a min
threshold (set for now to be a percent of a percent, 0.0001).

Change-Id: I721e6de343add6b8ebcf3ef4fad20f136302808e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122842
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-24 20:31:52 +00:00
Sam Rawlins bc5fb05def NNBD i13n: Highlight non-nullable types with upstream triggered edges
Change-Id: I10fc2f731381ab60f0f724b2d463533895348500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122405
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-22 20:06:06 +00:00
Paul Berry 5d4cd6d589 Breaking changes for analyzer version 0.39.
Change-Id: Ifa9ca24487f93f3eb0ec95eeb64f5bbb5aa32714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113216
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-21 18:23:10 +00:00
Konstantin Shcheglov cb9eefca4f Issue 142793249. Never remove directive with unresolved URIs.
Bug: https://buganizer.corp.google.com/issues/142793249
Change-Id: I5ced1bcf4cb5d634f8e11555bb464f10c4bac68c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121926
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-18 17:06:50 +00:00
Devon Carew 21972daf7d [analyzer] refactor the flutter assists menu
Change-Id: I6ecfa612b55aa755a5d56b2eac7d4f665954e5ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122025
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-18 00:15:46 +00:00
Sam Rawlins 8a92058226 Support omitted name args; fix as-expressions, refactor tests
Fixes #38919

Change-Id: Ia302e7d56aa20ebd1d9b7afa8ceda249ba31015b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-17 20:19:46 +00:00
Konstantin Shcheglov 1c2dc77f64 Issue 38947. Support for then/else widgets in ConditionalExpression.
Bug: https://github.com/dart-lang/sdk/issues/38947
Change-Id: Iec498eb9368d1090e8ba9e2221d00205df1ac746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121925
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-17 17:49:16 +00:00
Sam Rawlins 680a880c10 Move string utils from services/correction to utilities; more generally used
Change-Id: Idb81b54fe380e6af00af5ddee3977705ff58c741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121912
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-17 15:04:00 +00:00
Sam Rawlins 8e7fa2a35b NNBD i13n: Proper messages for nullable values in collection literals
Change-Id: I5eccfeb7d88f3f4adb57f3734f170dce82c1fd2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121906
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-17 03:41:11 +00:00
Devon Carew 68d398b392 [analyzer] add more diagnostics for ML completion
Change-Id: I63263ff3b51a4986c55567456bdfebeb9f355a5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121882
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-16 22:56:51 +00:00
Sam Rawlins 3e992eb8fe NNBD i13n: Add line numbers to a few messages
fixes #38920

Change-Id: I6656a2e47901cbe66ccbd040d3d2fe6913f7031a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121867
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-16 22:52:01 +00:00
Ari Aye 630100fb16 Don't allow ML to suggest punctuation by reference
This change filters out any predictions for names that
are neither alphanumeric nor strings.

Change-Id: I515ca1263a05f234b263ab6d01cd41f80704ea3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121805
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2019-10-16 21:05:36 +00:00
Sam Rawlins 2cee751fb9 dartfix: Don't sort edits when using --outputDir; fixes #38924
Change-Id: Id60264f6543fc9abff2180169dc363315d8e42a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121862
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-16 18:31:16 +00:00
Devon Carew e47ab49f0c [analyzer] add a diagnostics page for ml completion
Change-Id: Iaddef290048be2246372ada03828c6f282e94efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120900
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-16 15:46:43 +00:00