Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub workspaces confusing message when sdk constriant does not match the installed Dart version #4381

Open
orestesgaolin opened this issue Sep 11, 2024 · 0 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@orestesgaolin
Copy link

Environment

  • Dart version 3.6.0 (build 3.6.0-239.0.dev)
  • OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"): macOS
[✓] Flutter (Channel master, 3.26.0-1.0.pre.92, on macOS 14.5 23F79 darwin-arm64, locale pl-PL)
    • Flutter version 3.26.0-1.0.pre.92 on channel master at /Users/dominik/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea208f824b (3 hours ago), 2024-09-11 13:03:22 -0700
    • Engine revision ade8ef293b
    • Dart version 3.6.0 (build 3.6.0-239.0.dev)
    • DevTools version 2.39.0

Problem

I upgraded to current master and tried to use pub workspaces. However, because my packages would be set to use Dart SDK >= 3.3.0, a following error was shown when running flutter pub get

Error on line 9, column 13 of packages/analytics_repository/pubspec.yaml: `workspace` and `resolution` requires at least language version 3.5
  ╷
9 │ resolution: workspace
  │             ^^^^^^^^^
  ╵
Failed to update packages.

pubspec.yaml before change

name: analytics_repository
version: 0.0.1
publish_to: none

environment:
  sdk: ">=3.3.0 <4.0.0"
  flutter: ">=3.22.2"
resolution: workspace

required change

name: analytics_repository
version: 0.0.1
publish_to: none

environment:
  sdk: ">=3.5.0 <4.0.0"
  flutter: ">=3.22.2"
resolution: workspace

Expected behavior

I would expect a suggestion to change the Dart SDK constraint in the pubspec.yaml.

Actual behavior

as above

@sigurdm sigurdm added the type-enhancement A request for a change that isn't a bug label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants