Skip to content

[pub] Unexpected behavior for sdk constraint solving with sdk 3.0.0 update #3697

@annagrin

Description

@annagrin

The sdk constraint sdk: ">=2.18.0 <3.0.0" resolves, but sdk: ">=2.10.0 <3.0.0" does not with the current version of SDK 3.0.0-21.0.dev

Is it intentional? I would expect them both to fail to resolve.

Related: dart-lang/webdev#1824

pubscpec

name: _test
version: 1.0.0
description: >-
  A fake package used for testing weak null-safety.
publish_to: none

environment:
  sdk: ">=2.18.0 <3.0.0"

dependencies:
  intl: ^0.17.0
  path: ^1.6.1

dev_dependencies:
  build_runner: '>=1.6.2 <3.0.0'
  build_web_compilers: '>=2.12.0 <4.0.0'

Result

➜  _test git:(annagrin) dart pub upgrade
...
  watcher 1.0.2
  web_socket_channel 2.2.0
  yaml 3.1.1
No dependencies changed.
1 package has newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.

pubspec

name: _test
version: 1.0.0
description: >-
  A fake package used for testing weak null-safety.
publish_to: none

environment:
  sdk: ">=2.10.0 <3.0.0"

dependencies:
  intl: ^0.17.0
  path: ^1.6.1

dev_dependencies:
  build_runner: '>=1.6.2 <3.0.0'
  build_web_compilers: '>=2.12.0 <4.0.0'

Result

➜  _test git:(annagrin) dart pub upgrade
Resolving dependencies...
The current Dart SDK version is 3.0.0-21.0.dev.

Because _test requires SDK version >=2.10.0 <3.0.0, version solving failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions