Commit Graph

4090 Commits

Author SHA1 Message Date
Konstantin Shcheglov 806ec1161f Issue 3270. Put StreamBuilder's type argument into linked edit.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/3270
Change-Id: I8e4d10029c7eab1f9edeaeed97ac4d54a74d81cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96865
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-14 15:31:42 +00:00
Konstantin Shcheglov eeb19b0416 Remove usages of ExtensionManager and package:plugin in general.
R=brianwilkerson@google.com

Change-Id: I489e72464474b3d40d7678f44562f65934f93288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-14 15:31:08 +00:00
Paul Berry 31c47567dc Remove AnalysisOptionsForLink and plumb analysis options through linker.
This is a non-breaking change; the only way linking is exposed to
clients is through `SummaryBuilder`, which can get the analysis
options from the context.

Fixes #35747.

Change-Id: I273408f33a881ac32ab248cbc8f3e0644630563b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96829
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-13 22:39:53 +00:00
Konstantin Shcheglov 2d48159e38 Issue 36187. Fix for getSuggestionDetails() fails in part file.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36187
Change-Id: I428ab29a08eff43d5538d025b59374e4f8cad154
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96831
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-13 21:26:01 +00:00
Konstantin Shcheglov 81fa14eb3c Hollow out AnalysisContextImpl.
R=brianwilkerson@google.com

Change-Id: I4ebc67de74cc4bbda63c9f0a8f7c11dbc3f25b21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-13 15:18:22 +00:00
pq 09087490e2 update hasFix lookup table
Change-Id: Ie8386cf9fbdedfc6e8d08ce4939af60f623292a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-12 16:43:27 +00:00
pq bb7b5fcd37 add missing fix tests
Change-Id: I5c01d0a551050ce9bca36003efa0f6743a7965c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96543
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-12 16:39:27 +00:00
pq 48a5c3825a assist to convert to absolute imports
Change-Id: I2fd6ca7ec1184d56dfe97d430dc9a6c28a8c64bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-12 16:35:21 +00:00
Brian Wilkerson ed9e70c771 Add completion support for the ui-as-code features
Change-Id: I7835e7169fc702f69f01db0dd1f598a663dff196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96223
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-09 17:37:16 +00:00
pq 303b8bab3a fix for null_closures
Change-Id: I413b71dd1acdeaca4c4950b3e6914c1695b72018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95981
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-09 00:02:46 +00:00
pq 1e1d19bb02 fix for replace_colon_with_equals
Change-Id: Ifc4f20d6de04d506b783661ce7f0dbcc01440ca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96135
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-08 21:35:35 +00:00
pq 474e7dc865 update add await fix description
Change-Id: I482a8feed9d0b3d0f8e7914947eee21121cf574a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-08 20:31:15 +00:00
Paul Berry b72ab0790d Add an Iterable type to the nonstandard SDK test.
With the new "UI as code" functionality, the analyzer requires any SDK
it analyzes to contain an Iterable type.

Change-Id: Ib098b135665b970040abf9e319b93f36fe09bea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96122
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-08 20:13:38 +00:00
pq 8d88316246 fix for unawaited_futures
Change-Id: I9ef54b1d30dd651ebd2fe20c4ce89808879da529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-08 14:20:56 +00:00
Konstantin Shcheglov 4b609422e9 Make AVAILABLE_SUGGESTION_SETS and related APIs non-experimental.
R=brianwilkerson@google.com

Change-Id: I1facae905319f050636126b021f56f353f81d6f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95661
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-07 21:29:36 +00:00
pq ccf756dae5 Integration testing to ensure server lint name representations are correct.
If lint names do not match, associated fixes are never shown.

See https://dart-review.googlesource.com/c/sdk/+/95743 for the kind of bug this should guard against.


Change-Id: I27b33c56b9f9242497a03972129806863d2287a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-07 21:01:06 +00:00
pq 34e1c93906 add prefer_null_aware_operators error code association
Change-Id: I23210abe2c17b166d7a628ab374b4fdba0df1e22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-07 20:35:47 +00:00
pq da831bda20 fix lint name for unnecessary_overrides
Change-Id: Id6c879d52bb8cbe0c46d1701b382716846947926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95743
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-07 18:11:57 +00:00
pq cab4a7b48d fix lint name for unnecessary_brace_in_string_interps
Change-Id: I7df7540b4b4574df8e807b313988ed6a4bf6a26b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-07 15:33:33 +00:00
pq 00aeae4ca8 add fix for no_duplicate_case_values
See: https://github.com/dart-lang/linter/issues/1374.

Change-Id: Ia09f2530c9a943b8b80fda63fb313b752748264a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95709
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-07 15:26:26 +00:00
pq 593405afda add fix for use_rethrow
See: https://github.com/dart-lang/linter/issues/1374.

Change-Id: I7e79ad37681afdbd94d7968451a768e74217578e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95708
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-07 15:25:26 +00:00
pq 85dec3423c add fix for unnecessary_new lint
See: https://github.com/dart-lang/linter/issues/1374.

Change-Id: I945d393b0b46cf87b5400be1bfdb501c31646988
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95669
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-06 20:55:00 +00:00
pq 5441ff672b add fix for unnecessary_const lints
See: https://github.com/dart-lang/linter/issues/1374.

Change-Id: Ieeddf25718ddde77a9e52cb93cbcf34ca2c1f81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95542
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-06 15:28:59 +00:00
Konstantin Shcheglov c793038137 Identify flutter_web in Flutter.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36056
Change-Id: I53d0fd2c565369981c6615f356f0b44344683dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-05 20:20:31 +00:00
Danny Tuppeny 53438199a4 Tweak version numbers in LSP readme
Change-Id: I9dfa1165d41115ef6f30fd0718c75c058e8c968a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95380
Auto-Submit: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-03-05 18:16:31 +00:00
danrubel 96e982f054 Improve await-outside-async error recovery
Fix https://github.com/dart-lang/sdk/issues/36048

Change-Id: If40baa44a0aefa301c042bc1002d92e577bd3b9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95302
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-05 17:08:31 +00:00
Konstantin Shcheglov 3124125008 Move Flutter utility methods into a class, which can be instantiated either with regular package:flutter, or with package_flutter_web.
The factory constructors does not yet choose one, will do in a
following CL.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36056
Change-Id: I7fabe9da571ea80ce993d9303217ccd8b085e8a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95283
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-05 05:51:41 +00:00
lambdabaa 1c27b817fc New protocol to inspect analysis server state at code completion time
This change adds a new, experimental completion domain request
`completion.listTokenDetails`. Its purpose is to allow
other programs to observe and make smarter decisions contingent
upon analyzer's internal knowledge of a Dart program.

Bug: 36083
Change-Id: I5ab477221efeac076eccc873a29cf6feae91052e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95100
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-04 20:33:44 +00:00
Danny Tuppeny 15f1fc212c Add a flag to allow only analyzing project folders that contain open files
Change-Id: I7239043292315871d77739858b8342c434ac837c
Reviewed-on: https://dart-review.googlesource.com/c/93430
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-04 10:29:16 +00:00
Brian Wilkerson 4a144e631f Fix production of outline for incomplete generic function types (issue 36059)
Change-Id: Ie8e5279fb7b9094377197ee9d0f568f8baad3d10
Reviewed-on: https://dart-review.googlesource.com/c/95080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-02 01:37:32 +00:00
Konstantin Shcheglov 863f7df7aa Include debug info when dart:core is not resolved.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/35226
Change-Id: I3064e1f2affae9b6fdd34b3740882cd06f293cba
Reviewed-on: https://dart-review.googlesource.com/c/94983
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-01 19:25:00 +00:00
Paul Berry 7dec865054 Add set literal support to the flutter outline computer
Change-Id: I1d5f3dfdc4987bd7dc91dbd78ff5649667aa23b0
Reviewed-on: https://dart-review.googlesource.com/c/94760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 15:35:36 +00:00
Paul Berry 0adddfbeab Eliminate uses of old AST node types from analysis server
Change-Id: Ifc97c6e08cb40cf98c519b442d10d921b2cccd05
Reviewed-on: https://dart-review.googlesource.com/c/94364
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 12:37:56 +00:00
lambdabaa ae70ce855f Include the completion suggestion labels as explicit relevance tags
R=scheglov@google.com

Bug: 35680
Change-Id: I7525eac8bd95b28e32f714a4c519f6154805f861
Reviewed-on: https://dart-review.googlesource.com/c/94346
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 23:39:00 +00:00
Paul Berry a1349ac529 Remove childEntities and visitChildren from ForEachStatementImpl and ForStatementImpl.
This paves the way for replacing these data structures with
ForStatement2Impl, by making them expose the same set of child nodes
that ForStatement2Impl would.

This required some fixes in the implementations of completion and
refactoring, since they make assumptions about the relationships
between nodes and their children.

Change-Id: I35e2873fcee2c88215c51c5caa5318934fc2a1a8
Reviewed-on: https://dart-review.googlesource.com/c/94401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-27 21:41:00 +00:00
Danny Tuppeny 01cc5a6305 Ensure unknown fields in LSP payloads are ignored
Change-Id: I3f4a2763b2a8714a80108a895c1887b5a36d2a3d
Reviewed-on: https://dart-review.googlesource.com/c/94500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-27 15:00:17 +00:00
Danny Tuppeny 0e9d97498c Add some notes on using Dart LSP with Vim
Change-Id: I5b77243e8d725ca9802db56b59692b6e8a847d9c
Reviewed-on: https://dart-review.googlesource.com/c/94207
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 12:08:32 +00:00
Danny Tuppeny f484e1b05e Call canParse() for all LSP requests before passing to handlers
Any requests with params that don't pass canParse() will result in an InvalidParams error being returned without the handler being invoked.

Change-Id: Ic3e84b9259a467179baa2309fb58ee207f1225fa
Reviewed-on: https://dart-review.googlesource.com/c/94298
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-27 08:12:02 +00:00
Danny Tuppeny 0e54ce3b2d Fix a canParse method that would overflow the stack
This method is (accidentally) not currently being called, but it will be soon. The codegen wasn't using the resolved base-type for the enum when writing the type check.

Change-Id: I025ed5109c70d8916f800295350a3f4eaf8f16f2
Reviewed-on: https://dart-review.googlesource.com/c/94294
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 08:12:02 +00:00
Danny Tuppeny 8fb52650e5 Ensure LSP canParse type-checks optional values
Previously we were only outputting the validation code if the value was required. This changes it to also validate in the case it's not required, but only if it's not-null.

Without this change, the test that parses `'overwrite': 1` fails (a boolean is expected), but with it, it passes.

Change-Id: Ic4afe1f6a8f78add2385831907b226022b7ecaec
Reviewed-on: https://dart-review.googlesource.com/c/94293
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 08:12:02 +00:00
Danny Tuppeny 26d91cf4b6 If LSP initialize fails in tests, throw
Previously if a test didn't expect initialize to error (and didn't check for it), the test failure would be hard to diagnose. With this, if you don't explicitly opt-in to allowing failure, an error during initialize will just throw and fail the test.

Change-Id: I01283a70b3571415ec16f2fc4d781c08a953a6a1
Reviewed-on: https://dart-review.googlesource.com/c/94291
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 08:12:02 +00:00
Danny Tuppeny d1876531f2 Fix LSP canParse to allow nulls where the spec allows
Change-Id: I8a34fbf03e45c85a70d44a54b1715b87f84f9c3b
Reviewed-on: https://dart-review.googlesource.com/c/94290
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-27 08:12:02 +00:00
Paul Berry cfac26e184 Deprecate Expression.precedence.
In analyzer version 0.36.0, its return type will be changed to
`Precedence`.  Clients that wish to prepare for the change can switch
to `Expression.precedence2`.

Change-Id: I9c82fba557c5e3870c498afdb0bb5de22ba38240
Reviewed-on: https://dart-review.googlesource.com/c/94353
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-26 21:07:44 +00:00
Danny Tuppeny d4ff20f005 Remove unwanted @soloTest
Change-Id: I0804a7d409af0aaaea0b799a23a3b443cc1c23f4
Reviewed-on: https://dart-review.googlesource.com/c/94383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-26 15:35:12 +00:00
Danny Tuppeny a52ac7d27b Correct LSP canParse functions for classes containing restricted enums
This fixes a mistake where enum classes were resolved to their base types (string, num) before being output in canParse methods of their containing class. This meant for "restricted" enum types (those that should not allow any value), canParse would incorrectly return true for out-of-bound values as long as they were the correct type.

Change-Id: I44e37a60b49287cf7202d5a578ee9c08cf898078
Reviewed-on: https://dart-review.googlesource.com/c/94280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-26 07:38:12 +00:00
Danny Tuppeny bf0568c548 Document restrictions on LSP refactors/code fixes
We only provide fixes/refactors/assists to clients that support returning literal CodeActions (not just Commands). CodeActions allow us to return a WorkspaceEdit directly without having to encode the action into a command/argument set that is tround-tripped to the client. Supporting CodeActions on the client is relatively straight forward (since it just removes a round-trip and applies the edit directly).

Change-Id: I7f5a8c22e66ac23bcde6d5782bc2eaa6aeb283da
Reviewed-on: https://dart-review.googlesource.com/c/94221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-25 17:45:34 +00:00
Danny Tuppeny 73e544ed0b Improve errors when LSP integration tests fail to spawn server
When the server fails to start up (writing to stderr) the tests currently would just hang waiting for responses to messages. This will just throw the message as an exception, failing the test with a more useful message, for example:

```
00:07 +0 -1: ServerTest | test_exit_afterShutdown [E]
  Analysis Server wrote to stderr:

  file:///Users/dantup/Dev/Google/dart-sdk/sdk/third_party/pkg/linter/lib/src/analyzer.dart:106:27: Error: The method 'registerDefault' isn't defined for the class 'Registry'.
   - 'Registry' is from 'package:analyzer/src/lint/registry.dart' ('file:///Users/dantup/Dev/Google/dart-sdk/sdk/pkg/analyzer/lib/src/lint/registry.dart').
  Try correcting the name to the name of an existing method, or defining a method named 'registerDefault'.
      Registry.ruleRegistry.registerDefault(lint);
                            ^^^^^^^^^^^^^^^
```

Change-Id: If64b68b17a0d379f8879891f0346704d4ad360e8

Remove unused imports

Change-Id: I745499f7b038c81320c127410967d939c7756e51
Reviewed-on: https://dart-review.googlesource.com/c/94222
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-25 17:13:52 +00:00
Danny Tuppeny 380cec1708 Wait for LSP server to be ready before sending exit command in integration test
Otherwise we'll need to increase the timeout to account for server startup (which will mask if the exit really is taking a longer time than it should).

Change-Id: I5c770efa62dc2a66946fd7a6c07665d3f1b80ee4
Reviewed-on: https://dart-review.googlesource.com/c/94260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-25 17:12:57 +00:00
Danny Tuppeny 1e60ddbc5b Make more LSP enum classes support "any value"
Previously we assumed enum classes could only be the values specified in the spec, but this was not correct - newer clients may know about values that we did not know about at the time we shipped(/last regenerated).

This makes the default for an enum class to support any class (avoiding deserialisation failures when new clients send newer values), and opts-out for those where the spec is explicit that the value set is fixed.

Also opened https://github.com/Microsoft/language-server-protocol/issues/686 for clarification that these "fixed set" values are explicitly intended to never be extended, or whether this is accidental.

Change-Id: I6243fc91c14ec0fa5622d3f6f29bf77cadf7da64
Reviewed-on: https://dart-review.googlesource.com/c/94220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-25 17:05:47 +00:00
Danny Tuppeny 6af24a2490 Move LSP diagnostic server test -> integration
This tests we can spawn the diagnostic server on-demand. The test was previously marked failing because it needed to be a real inrtegration test.

Change-Id: I52638682d7fb1807584601f7ff933f30b1bd6d70
Reviewed-on: https://dart-review.googlesource.com/c/93949
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-25 12:03:58 +00:00