Skip to content

Version solving fails for package that requires >=2.19.0 when 2.19.0-444.6.beta is available #3755

Open
@Barabas5532

Description

@Barabas5532

Environment

  • Dart version (run dart --version):
    • 2.19.0-444.6.beta
  • OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"):
    • Ubuntu 22.04 (Github actions ubuntu-latest)
    • Arch Linux
  • Are you using the Chinese community mirror or a corporate firewall?
    • No

Problem

The following error is printed during pub get:

Running "flutter pub get" in dart_juce_ipc...
Resolving dependencies...
The current Dart SDK version is 2.19.0-444.6.beta.

Because juce_ipc requires SDK version >=2.19.0 <4.0.0, version solving failed.
pub get failed

Also available in Github Actions: https://github.com/Barabas5532/dart_juce_ipc/actions/runs/4019136178/jobs/6931366522

name: juce_ipc
description: Implementation of inter-process communication classes from JUCE
version: 0.0.1
homepage: https://github.com/Barabas5532/flutter_juce_ipc

publish_to: 'none'

environment:
  sdk: '>=2.19.0 <3.0.0'

dependencies:
  collection: ^1.17.0
  freezed_annotation: ^2.2.0
  logging: ^1.1.0
  path: ^1.8.0

dev_dependencies:
  build_runner: ^2.0.0
  dart_pre_commit: ^4.0.0
  dcli_core: ^1.36.0
  freezed: ^2.0.0
  lints: ^2.0.1
  stdlibc: ^0.1.1
  test: ^1.0.0

# These are unlikely to cause issues, and are checked in CI anyway
dart_pre_commit:
  flutter-compat: false
  outdated: false
  pull-up-dependencies: false

I've found some related issues:

Seems like this is documentation bug, and pub does not follow the Sematic Versioning specification as implied by the reference on this page. The main documentation page for versioning does not mention pre-releases at all.

Expected behavior

From Semantic Version 2.0.0-rc.1 :

A pre-release version MAY be denoted by appending a dash and a series of dot separated identifiers immediately following the patch version. Identifiers MUST be comprised of only ASCII alphanumerics and dash [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.

2.19.0-444.6.beta should satisfy >=2.19.0

Actual behavior

2.19.0-444.6.beta does not satisfy >=2.19.0

--trace output

$ dart pub get --trace
Resolving dependencies...
The current Dart SDK version is 2.19.0-444.6.beta.

Because juce_ipc requires SDK version >=2.19.0 <4.0.0, version solving failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)type-documentationA request to add or improve documentationtype-questionA question about expected behavior or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions