Skip to content

Commit 7fb2897

Browse files
srawlinsCommit Queue
authored andcommitted
DAS plugins: Use a caret dependency on the analysis_server_plugin package
Also stop generating that version number. This code that used the version of the analysis_server_plugin package in the Dart SDK was defensive, but is now seen as overly restrictive; it does not allow bug fixes to be used, to no benefit. The only reason to bump the minimum version here is if there is a change made to the API spec which is breaking, which requires a new version of the package in order to communicate with DAS. Change-Id: I13dab8135a8ec754aa993509656d871a547cb9cc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446686 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 2d7c7b0 commit 7fb2897

File tree

4 files changed

+3
-73
lines changed

4 files changed

+3
-73
lines changed

pkg/analysis_server/lib/src/plugin2/analyzer_version.g.dart

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkg/analysis_server/lib/src/plugin2/generator.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:analysis_server/src/plugin2/analyzer_version.g.dart';
65
import 'package:analyzer/dart/analysis/analysis_options.dart';
76

87
/// This class can generate various files to make up the shared plugin package.
@@ -64,7 +63,9 @@ version: 0.0.1
6463
environment:
6564
sdk: ^3.6.0
6665
dependencies:
67-
analysis_server_plugin: '$analysisServerPluginVersion'
66+
# The version of the analysis_server_plugin package that matches the protocol
67+
# used by the active analysis_server.
68+
analysis_server_plugin: ^0.2.0
6869
''');
6970

7071
for (var configuration in _pluginConfigurations) {

pkg/analysis_server/test/src/plugin2/generator_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:analysis_server/src/plugin2/analyzer_version.g.dart';
65
import 'package:analysis_server/src/plugin2/generator.dart';
76
import 'package:analyzer/src/generated/engine.dart';
87
import 'package:test/test.dart';
@@ -68,8 +67,6 @@ import 'package:no_ints/main.dart' as no_ints;
6867
expect(
6968
pluginPackageGenerator.generatePubspec(),
7069
contains('''
71-
dependencies:
72-
analysis_server_plugin: '$analysisServerPluginVersion'
7370
no_bools:
7471
git:
7572
url: https://example.com/example.git
@@ -91,8 +88,6 @@ dependencies:
9188
expect(
9289
pluginPackageGenerator.generatePubspec(),
9390
contains('''
94-
dependencies:
95-
analysis_server_plugin: '$analysisServerPluginVersion'
9691
no_bools:
9792
path: ../no_bools_plugin
9893
no_ints:
@@ -126,8 +121,6 @@ environment:
126121
expect(
127122
pluginPackageGenerator.generatePubspec(),
128123
contains('''
129-
dependencies:
130-
analysis_server_plugin: '$analysisServerPluginVersion'
131124
no_bools: ^1.0.0
132125
no_ints: ^1.2.0
133126
'''),

pkg/analysis_server/tool/generate_analysis_server_plugin_version.dart

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)