onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
236 stars 26 forks source link

New release of `pubspec2 2.5.0` breaks all `dcli 2` versions #218

Closed Giuspepe closed 11 months ago

Giuspepe commented 1 year ago

All versions of dcli 2 depend on pubspec2: ^2.4.2 (e.g. dcli 2.2.3)

This dependency constraint also includes the newly released pubspec2 2.5.0. However, there were breaking changes in pubspec2 2.5.0 which cause all dcli 2.x.y to break:

../../../.pub-cache/hosted/pub.dev/dcli-2.2.3/lib/src/commands/lock.dart:123:36: Error: Too many positional arguments: 3 allowed, but 4 found.
Try removing the extra positional arguments.
            ExternalHostedReference(hosted.package, hosted.url, version, false)
                                   ^
../../../.pub-cache/hosted/pub.dev/pubspec2-2.5.0/lib/src/dependency.dart:151:9: Context: Found this candidate, but the arguments don't match.
  const ExternalHostedReference(this.name, this.url, this.versionConstraint,
        ^^^^^^^^^^^^^^^^^^^^^^^

This is the relevant breaking change (I haven't checked if there are any other breaking changes)

pubspec2 2.5.0: const ExternalHostedReference(this.name, this.url, this.versionConstraint, {this.verboseFormat = true});

pubspec2 2.4.2: ExternalHostedReference(this.name, this.url, this.versionConstraint, [this.verboseFormat = true]);

bsutton commented 1 year ago

I've retracted the 2.5 release of pubspec2 and will re-release as 3.x.

dcli should now work.

I will re-release pubspec2 as 3.x

appologies.