Skip to content

Commit

Permalink
Improve the toString method on the BuildSpec class (#7811)
Browse files Browse the repository at this point in the history
Other changes are from the Dart formatter
  • Loading branch information
jwren authored Nov 23, 2024
1 parent 03d6ca1 commit 70bfd81
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tool/plugin/lib/build_spec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class BuildSpec {
// Build targets
// TODO (jwren) can we get rid of "name"
final String name;

// TODO (jwren) these two can be consilidated

final String version;
Expand Down Expand Up @@ -100,8 +101,14 @@ class BuildSpec {

@override
String toString() {
return 'BuildSpec($ideaProduct $ideaVersion $dartPluginVersion $sinceBuild '
'$untilBuild version: "$release")';
return 'BuildSpec('
'ideaProduct: $ideaProduct, '
'ideaVersion: $ideaVersion, '
'baseVersion: $baseVersion, '
'dartPluginVersion: $dartPluginVersion, '
'since: $sinceBuild, '
'until: $untilBuild, '
'version: "$release")';
}

Future<BuildSpec> initChangeLog() async {
Expand Down Expand Up @@ -131,9 +138,11 @@ class BuildSpec {
class SyntheticBuildSpec extends BuildSpec {
late final BuildSpec alternate;

SyntheticBuildSpec.fromJson(super.json,
super.releaseNum,
List<BuildSpec> specs,) : super.fromJson() {
SyntheticBuildSpec.fromJson(
super.json,
super.releaseNum,
List<BuildSpec> specs,
) : super.fromJson() {
try {
// 'isUnitTestTarget' should always be in the spec for the latest IntelliJ (not AS).
alternate = specs.firstWhere((s) => s.isUnitTestTarget);
Expand Down

0 comments on commit 70bfd81

Please sign in to comment.