diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html index 9756879c7a5..bc2d1b1d455 100644 --- a/pkg/analysis_server/doc/api.html +++ b/pkg/analysis_server/doc/api.html @@ -143,9 +143,9 @@ a:focus, a:hover { To ease interoperability with Lisp-based clients (which may not be able to easily distinguish between empty lists, empty maps, and null), client-to-server communication is allowed to replace - any instance of “{}” or “[]” with null. The + any instance of "{}" or "[]" with null. The server will always properly represent empty lists as - “[]” and empty maps as “{}”. + "[]" and empty maps as "{}".

Communication Structure

@@ -2062,7 +2062,7 @@ a:focus, a:hover { structure of the data is dependent on the kind of refactoring being performed. The data that is expected is documented in the section titled Refactorings, labeled as - “Options”. This field can be omitted if the refactoring + "Options". This field can be omitted if the refactoring does not require any options or if the values of those options are not known.

@@ -2096,7 +2096,7 @@ a:focus, a:hover { of the data is dependent on the kind of refactoring being created. The data that is returned is documented in the section titled Refactorings, labeled as - “Feedback”. + "Feedback".

change (optional SourceChange)
@@ -2349,6 +2349,10 @@ a:focus, a:hover { "id": String "error": optional RequestError } +

+ Deprecated: the analysis server no longer fires + LAUNCH_DATA events. +

Subscribe for services. All previous subscriptions are replaced by the given set of services. @@ -3310,8 +3314,8 @@ a:focus, a:hover {

A human-readable description of the kind of element being - referenced (such as “class” or “function type - alias”). This data is omitted if there is no referenced + referenced (such as "class" or "function type + alias"). This data is omitted if there is no referenced element.

isDeprecated (optional bool)
@@ -4505,8 +4509,8 @@ a:focus, a:hover {

The human-readable description of the kind of element being - renamed (such as “class” or “function type - alias”). + renamed (such as "class" or "function type + alias").

oldName (String)
diff --git a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart index 59b76b03c14..f3c299d7035 100644 --- a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart +++ b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart @@ -6227,7 +6227,7 @@ class EditGetRefactoringParams implements HasToJson { * Data used to provide values provided by the user. The structure of the * data is dependent on the kind of refactoring being performed. The data * that is expected is documented in the section titled Refactorings, labeled - * as “Options”. This field can be omitted if the refactoring does not + * as "Options". This field can be omitted if the refactoring does not * require any options or if the values of those options are not known. */ RefactoringOptions get options => _options; @@ -6236,7 +6236,7 @@ class EditGetRefactoringParams implements HasToJson { * Data used to provide values provided by the user. The structure of the * data is dependent on the kind of refactoring being performed. The data * that is expected is documented in the section titled Refactorings, labeled - * as “Options”. This field can be omitted if the refactoring does not + * as "Options". This field can be omitted if the refactoring does not * require any options or if the values of those options are not known. */ void set options(RefactoringOptions value) { @@ -6432,7 +6432,7 @@ class EditGetRefactoringResult implements HasToJson { * Data used to provide feedback to the user. The structure of the data is * dependent on the kind of refactoring being created. The data that is * returned is documented in the section titled Refactorings, labeled as - * “Feedback”. + * "Feedback". */ RefactoringFeedback get feedback => _feedback; @@ -6440,7 +6440,7 @@ class EditGetRefactoringResult implements HasToJson { * Data used to provide feedback to the user. The structure of the data is * dependent on the kind of refactoring being created. The data that is * returned is documented in the section titled Refactorings, labeled as - * “Feedback”. + * "Feedback". */ void set feedback(RefactoringFeedback value) { this._feedback = value; @@ -11571,14 +11571,14 @@ class HoverInformation implements HasToJson { /** * A human-readable description of the kind of element being referenced (such - * as “class” or “function type alias”). This data is omitted if there is no + * as "class" or "function type alias"). This data is omitted if there is no * referenced element. */ String get elementKind => _elementKind; /** * A human-readable description of the kind of element being referenced (such - * as “class” or “function type alias”). This data is omitted if there is no + * as "class" or "function type alias"). This data is omitted if there is no * referenced element. */ void set elementKind(String value) { @@ -16976,13 +16976,13 @@ class RenameFeedback extends RefactoringFeedback { /** * The human-readable description of the kind of element being renamed (such - * as “class” or “function type alias”). + * as "class" or "function type alias"). */ String get elementKindName => _elementKindName; /** * The human-readable description of the kind of element being renamed (such - * as “class” or “function type alias”). + * as "class" or "function type alias"). */ void set elementKindName(String value) { assert(value != null); diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart index 29449c5b3fa..6b507c3a5f7 100644 --- a/pkg/analysis_server/lib/src/domain_execution.dart +++ b/pkg/analysis_server/lib/src/domain_execution.dart @@ -159,20 +159,24 @@ class ExecutionDomainHandler implements RequestHandler { * Implement the 'execution.setSubscriptions' request. */ Response setSubscriptions(Request request) { - List subscriptions = - new ExecutionSetSubscriptionsParams.fromRequest(request).subscriptions; - if (subscriptions.contains(ExecutionService.LAUNCH_DATA)) { - if (onFileAnalyzed == null) { - onFileAnalyzed = server.onFileAnalyzed.listen(_fileAnalyzed); - _reportCurrentFileStatus(); - } + if (server.options.enableNewAnalysisDriver) { + return new ExecutionSetSubscriptionsResult().toResponse(request.id); } else { - if (onFileAnalyzed != null) { - onFileAnalyzed.cancel(); - onFileAnalyzed = null; + List subscriptions = + new ExecutionSetSubscriptionsParams.fromRequest(request).subscriptions; + if (subscriptions.contains(ExecutionService.LAUNCH_DATA)) { + if (onFileAnalyzed == null) { + onFileAnalyzed = server.onFileAnalyzed.listen(_fileAnalyzed); + _reportCurrentFileStatus(); + } + } else { + if (onFileAnalyzed != null) { + onFileAnalyzed.cancel(); + onFileAnalyzed = null; + } } + return new ExecutionSetSubscriptionsResult().toResponse(request.id); } - return new ExecutionSetSubscriptionsResult().toResponse(request.id); } void _fileAnalyzed(ChangeNotice notice) { diff --git a/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart index fcd4189926c..fe7d3945e63 100644 --- a/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart +++ b/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import 'package:analysis_server/plugin/protocol/protocol.dart'; -import 'package:test/test.dart'; import 'package:test_reflective_loader/test_reflective_loader.dart'; import '../integration_tests.dart'; @@ -16,23 +15,9 @@ main() { @reflectiveTest class SetSubscriptionsTest extends AbstractAnalysisServerIntegrationTest { - // Bad state: Should not be used with the new analysis driver (#28806) - @failingTest test_subscribe() async { - writeFile(sourcePath('.packages'), 'foo:lib/'); standardAnalysisSetup(); await sendExecutionSetSubscriptions([ExecutionService.LAUNCH_DATA]); - - String contextId = - (await sendExecutionCreateContext(sourceDirectory.path)).id; - expect(contextId, isNotNull); - - String pathname = sourcePath('lib/main.dart'); - writeFile(pathname, 'void main() {}'); - - ExecutionLaunchDataParams data = await onExecutionLaunchData.first; - expect(data.kind, ExecutableKind.SERVER); - expect(data.file, pathname); } @override diff --git a/pkg/analysis_server/test/integration/integration_test_methods.dart b/pkg/analysis_server/test/integration/integration_test_methods.dart index 14251bba346..446d9d9664d 100644 --- a/pkg/analysis_server/test/integration/integration_test_methods.dart +++ b/pkg/analysis_server/test/integration/integration_test_methods.dart @@ -1348,7 +1348,7 @@ abstract class IntegrationTestMixin { * Data used to provide values provided by the user. The structure of the * data is dependent on the kind of refactoring being performed. The data * that is expected is documented in the section titled Refactorings, - * labeled as “Options”. This field can be omitted if the refactoring does + * labeled as "Options". This field can be omitted if the refactoring does * not require any options or if the values of those options are not known. * * Returns @@ -1376,7 +1376,7 @@ abstract class IntegrationTestMixin { * Data used to provide feedback to the user. The structure of the data is * dependent on the kind of refactoring being created. The data that is * returned is documented in the section titled Refactorings, labeled as - * “Feedback”. + * "Feedback". * * change (optional SourceChange) * @@ -1563,6 +1563,8 @@ abstract class IntegrationTestMixin { } /** + * Deprecated: the analysis server no longer fires LAUNCH_DATA events. + * * Subscribe for services. All previous subscriptions are replaced by the * given set of services. * diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java index 99e5ac09d34..67bce36ba9d 100644 --- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java +++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java @@ -378,7 +378,7 @@ public interface AnalysisServer { * validated and no change be generated. * @param options Data used to provide values provided by the user. The structure of the data is * dependent on the kind of refactoring being performed. The data that is expected is - * documented in the section titled Refactorings, labeled as “Options”. This field can be + * documented in the section titled Refactorings, labeled as "Options". This field can be * omitted if the refactoring does not require any options or if the values of those * options are not known. */ @@ -467,6 +467,8 @@ public interface AnalysisServer { /** * {@code execution.setSubscriptions} * + * Deprecated: the analysis server no longer fires LAUNCH_DATA events. + * * Subscribe for services. All previous subscriptions are replaced by the given set of services. * * It is an error if any of the elements in the list are not valid services. If there is an error, diff --git a/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java b/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java index d1dd58d24db..b9ca9819825 100644 --- a/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java +++ b/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java @@ -89,8 +89,8 @@ public class HoverInformation { private final String elementDescription; /** - * A human-readable description of the kind of element being referenced (such as “class” or - * “function type alias”). This data is omitted if there is no referenced element. + * A human-readable description of the kind of element being referenced (such as "class" or + * "function type alias"). This data is omitted if there is no referenced element. */ private final String elementKind; @@ -228,8 +228,8 @@ public class HoverInformation { } /** - * A human-readable description of the kind of element being referenced (such as “class” or - * “function type alias”). This data is omitted if there is no referenced element. + * A human-readable description of the kind of element being referenced (such as "class" or + * "function type alias"). This data is omitted if there is no referenced element. */ public String getElementKind() { return elementKind; diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java index 35dacffe8f2..c10021ff74e 100644 --- a/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java +++ b/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java @@ -52,8 +52,8 @@ public class RenameFeedback extends RefactoringFeedback { private final int length; /** - * The human-readable description of the kind of element being renamed (such as “class” or - * “function type alias”). + * The human-readable description of the kind of element being renamed (such as "class" or + * "function type alias"). */ private final String elementKindName; @@ -106,8 +106,8 @@ public class RenameFeedback extends RefactoringFeedback { } /** - * The human-readable description of the kind of element being renamed (such as “class” or - * “function type alias”). + * The human-readable description of the kind of element being renamed (such as "class" or + * "function type alias"). */ public String getElementKindName() { return elementKindName; diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html index 2297a33eafb..c88edaa6145 100644 --- a/pkg/analysis_server/tool/spec/spec_input.html +++ b/pkg/analysis_server/tool/spec/spec_input.html @@ -41,9 +41,9 @@ To ease interoperability with Lisp-based clients (which may not be able to easily distinguish between empty lists, empty maps, and null), client-to-server communication is allowed to replace - any instance of “{}” or “[]” with null. The + any instance of "{}" or "[]" with null. The server will always properly represent empty lists as - “[]” and empty maps as “{}”. + "[]" and empty maps as "{}".

Communication Structure

@@ -1733,7 +1733,7 @@ refactoring being performed. The data that is expected is documented in the section titled Refactorings, labeled as - “Options”. This field can be omitted if the refactoring + "Options". This field can be omitted if the refactoring does not require any options or if the values of those options are not known.

@@ -1774,7 +1774,7 @@ being created. The data that is returned is documented in the section titled Refactorings, labeled as - “Feedback”. + "Feedback".

@@ -1984,6 +1984,10 @@ +

+ Deprecated: the analysis server no longer fires + LAUNCH_DATA events. +

Subscribe for services. All previous subscriptions are replaced by the given set of services. @@ -3127,8 +3131,8 @@ String

A human-readable description of the kind of element being - referenced (such as “class” or “function type - alias”). This data is omitted if there is no referenced + referenced (such as "class" or "function type + alias"). This data is omitted if there is no referenced element.

@@ -4556,8 +4560,8 @@ String

The human-readable description of the kind of element being - renamed (such as “class” or “function type - alias”). + renamed (such as "class" or "function type + alias").

diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart index f120ad0ea02..467b71f591f 100644 --- a/pkg/analyzer/lib/src/command_line/arguments.dart +++ b/pkg/analyzer/lib/src/command_line/arguments.dart @@ -173,7 +173,7 @@ void defineAnalysisArguments(ArgParser parser, {bool hide: true, ddc: false}) { parser.addFlag(enableInitializingFormalAccessFlag, help: 'Enable support for allowing access to field formal parameters in a ' - 'constructor\'s initializer list', + 'constructor\'s initializer list.', defaultsTo: false, negatable: false, hide: hide || ddc); diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart index d1550c30f5a..53cf041c5b9 100644 --- a/pkg/analyzer_cli/lib/src/options.dart +++ b/pkg/analyzer_cli/lib/src/options.dart @@ -350,7 +350,7 @@ class CommandLineOptions { hide: hide) ..addOption('build-summary-input', help: 'Path to a summary file that contains information from a ' - 'previous analysis run. May be specified multiple times.', + 'previous analysis run; may be specified multiple times.', allowMultiple: true, hide: hide) ..addOption('build-summary-output', @@ -399,7 +399,7 @@ class CommandLineOptions { hide: hide) ..addOption('x-package-warnings-prefix', help: - 'Show warnings from package: imports that match the given prefix', + 'Show warnings from package: imports that match the given prefix.', hide: hide) ..addFlag('enable-conditional-directives', help: @@ -490,7 +490,7 @@ class CommandLineOptions { return null; // Only reachable in testing. } } else if (results['version']) { - outSink.write('$_binaryName version ${_getVersion()}'); + outSink.writeln('$_binaryName version ${_getVersion()}'); exitHandler(0); return null; // Only reachable in testing. } else {