Skip to content

Commit e4e36a3

Browse files
srawlinsCommit Queue
authored andcommitted
DAS plugins: Make a constraint on the analysis_server_plugin package instead of the others
Fixes #61182 Change-Id: I46cff3e599ae63fb718a1e05778afa05be50ab79 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441835 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 251ca0b commit e4e36a3

File tree

4 files changed

+16
-29
lines changed

4 files changed

+16
-29
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44

55
// THIS FILE IS GENERATED. DO NOT EDIT.
66
//
7-
// Instead, run 'dart pkg/analysis_server/tool/generate_analyzer_version.dart'
7+
// Instead, run
8+
// 'dart pkg/analysis_server/tool/generate_analysis_server_plugin_version.dart'
89
// to update this file.
910

10-
/// The version of the analyzer_plugin package that matches the analyzer_plugin
11-
/// code used by the analysis_server package.
12-
var analyzerPluginVersion = '0.13.0';
13-
14-
/// The version of the analyzer package that matches the analyzer code used by
15-
/// the analysis_server package.
16-
var analyzerVersion = '7.3.0';
11+
/// The version of the analysis_server_plugin package that matches the protocol
12+
/// used by the analysis_server package.
13+
var analysisServerPluginVersion = '0.2.0';

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ version: 0.0.1
6464
environment:
6565
sdk: ^3.6.0
6666
dependencies:
67-
analyzer: '$analyzerVersion'
68-
analyzer_plugin: '$analyzerPluginVersion'
67+
analysis_server_plugin: '$analysisServerPluginVersion'
6968
''');
7069

7170
for (var configuration in _pluginConfigurations) {

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ import 'package:no_ints/main.dart' as no_ints;
6969
pluginPackageGenerator.generatePubspec(),
7070
contains('''
7171
dependencies:
72-
analyzer: '$analyzerVersion'
73-
analyzer_plugin: '$analyzerPluginVersion'
72+
analysis_server_plugin: '$analysisServerPluginVersion'
7473
no_bools:
7574
git:
7675
url: https://example.com/example.git
@@ -93,8 +92,7 @@ dependencies:
9392
pluginPackageGenerator.generatePubspec(),
9493
contains('''
9594
dependencies:
96-
analyzer: '$analyzerVersion'
97-
analyzer_plugin: '$analyzerPluginVersion'
95+
analysis_server_plugin: '$analysisServerPluginVersion'
9896
no_bools:
9997
path: ../no_bools_plugin
10098
no_ints:
@@ -129,8 +127,7 @@ environment:
129127
pluginPackageGenerator.generatePubspec(),
130128
contains('''
131129
dependencies:
132-
analyzer: '$analyzerVersion'
133-
analyzer_plugin: '$analyzerPluginVersion'
130+
analysis_server_plugin: '$analysisServerPluginVersion'
134131
no_bools: ^1.0.0
135132
no_ints: ^1.2.0
136133
'''),

pkg/analysis_server/tool/generate_analyzer_version.dart renamed to pkg/analysis_server/tool/generate_analysis_server_plugin_version.dart

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,19 @@ List<GeneratedContent> get allTargets {
2525
2626
// THIS FILE IS GENERATED. DO NOT EDIT.
2727
//
28-
// Instead, run 'dart pkg/analysis_server/tool/generate_analyzer_version.dart'
28+
// Instead, run
29+
// 'dart pkg/analysis_server/tool/generate_analysis_server_plugin_version.dart'
2930
// to update this file.
3031
3132
''');
3233

33-
var analyzerPluginVersion = versionFromPubspec(
34-
normalize(join(packageRoot, 'analyzer_plugin', 'pubspec.yaml')),
35-
);
36-
var analyzerVersion = versionFromPubspec(
37-
normalize(join(packageRoot, 'analyzer', 'pubspec.yaml')),
34+
var analysisServerPluginVersion = versionFromPubspec(
35+
normalize(join(packageRoot, 'analysis_server_plugin', 'pubspec.yaml')),
3836
);
3937
buffer.write('''
40-
/// The version of the analyzer_plugin package that matches the analyzer_plugin
41-
/// code used by the analysis_server package.
42-
var analyzerPluginVersion = '$analyzerPluginVersion';
43-
44-
/// The version of the analyzer package that matches the analyzer code used by
45-
/// the analysis_server package.
46-
var analyzerVersion = '$analyzerVersion';
38+
/// The version of the analysis_server_plugin package that matches the protocol
39+
/// used by the analysis_server package.
40+
var analysisServerPluginVersion = '$analysisServerPluginVersion';
4741
4842
''');
4943
return buffer.toString();

0 commit comments

Comments
 (0)