dart-sdk/pkg/analysis_server/test
Brian Wilkerson 9db372e6f4 Make Location.endLine and Location.endColumn optional fields in the protocol
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.

This CL makes those fields optional in order to fix the deserialization
issue.

Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.

We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.

Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-15 17:35:55 +00:00
..
analysis Cleanup invalid declarations of main, part 1 2021-06-28 18:13:24 +00:00
channel Migrate lib/src/channel/ 2021-04-06 23:16:43 +00:00
client Cleanup invalid declarations of main, part 1 2021-06-28 18:13:24 +00:00
edit Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
integration Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
lsp Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
mock_packages Adds assist for basic Flutter Builder 2021-04-12 17:33:06 +00:00
plugin Convert several of servers tests to be null safe by default 2021-06-24 04:05:39 +00:00
search Cleanup invalid declarations of main, part 1 2021-06-28 18:13:24 +00:00
services Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
src Make Location.endLine and Location.endColumn optional fields in the protocol 2021-07-15 17:35:55 +00:00
stress Make ResolvedUnitResult.content/unit non-nullable. 2021-07-14 02:33:10 +00:00
timing Migrate some tests and test utilities in server 2021-04-03 19:23:44 +00:00
tool [analysis_server] Swap from dynamic to Object? in LSP generated code 2021-07-07 17:14:34 +00:00
utils Make local variables that hide fields be final (analysis_server) 2021-04-24 18:12:07 +00:00
abstract_context.dart Rename AnalysisSession.getXyz2() into getXyz(). 2021-07-12 22:42:58 +00:00
abstract_single_unit.dart Make ResolvedUnitResult.content/unit non-nullable. 2021-07-14 02:33:10 +00:00
analysis_abstract.dart Use newAnalysisOptionsYamlFile() where possible. 2021-06-09 23:57:29 +00:00
analysis_server_test.dart Use newAnalysisOptionsYamlFile() where possible. 2021-06-09 23:57:29 +00:00
benchmarks_test.dart Enable omit_local_variable_types in analysis_server 2020-03-30 03:58:44 +00:00
completion_test.dart Cleanup invalid declarations of main, part 1 2021-06-28 18:13:24 +00:00
completion_test_support.dart Migrate remaining unblocked tests 2021-04-19 15:57:38 +00:00
constants.dart Migrate analysis_server and analysis_server_client protocol. 2021-04-02 06:46:41 +00:00
domain_analysis_test.dart Use newAnalysisOptionsYamlFile() where possible. 2021-06-09 23:57:29 +00:00
domain_completion_test.dart Cleanup invalid declarations of main, part 1 2021-06-28 18:13:24 +00:00
domain_completion_util.dart Migrate remaining unblocked tests 2021-04-19 15:57:38 +00:00
domain_diagnostic_test.dart Migrate several test classes 2021-04-19 00:38:19 +00:00
domain_execution_test.dart Migrate several test classes 2021-04-19 00:38:19 +00:00
domain_server_test.dart Migrate several test classes 2021-04-19 00:38:19 +00:00
mocks.dart Migrate lib/src/protocol_server.dart and related. 2021-04-07 00:26:59 +00:00
mocks_lsp.dart [analysis_server] Swap from dynamic to Object? in LSP generated code 2021-07-07 17:14:34 +00:00
protocol_server_test.dart Make AnalysisResult.path non-nullable. 2021-07-12 18:21:11 +00:00
protocol_test.dart Migrate analysis_server and analysis_server_client protocol. 2021-04-02 06:46:41 +00:00
socket_server_test.dart Remove some unnecessary null checks 2021-04-24 18:22:43 +00:00
test_all.dart [analysis_server] Add a test to ensure no @soloTest annotations 2021-07-14 19:42:30 +00:00
verify_no_solo_test.dart [analysis_server] Add a test to ensure no @soloTest annotations 2021-07-14 19:42:30 +00:00
verify_sorted_test.dart Rename AnalysisSession.getXyz2() into getXyz(). 2021-07-12 22:42:58 +00:00
verify_tests_test.dart Migrate some additional libraries and their tests 2021-04-02 20:02:22 +00:00