Skip to content

Workspaces Breaks Pub Get For Standalone Packages #160477

@rayliverified

Description

@rayliverified

Steps to reproduce

Add resolution: workspace to a package's pubspec.yaml file. Pub get will throw the following error:

[ExampleSDK] flutter pub get --no-example
Found a pubspec.yaml at /Users/ray/Development/ExampleSDK. But it has resolution workspace.
But found no workspace root including it in parent directories.

See https://dart.dev/go/pub-workspaces for more information.
Failed to update packages.
exit code 66

Actual results

Packages pub get no longer works if the package is opened outside of a workspace.

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel beta, 3.28.0-0.1.pre, on macOS 15.1.1 24B2091 darwin-arm64, locale en-US)
    • Flutter version 3.28.0-0.1.pre on channel beta at /Users/ray/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3e493a3e4d (6 days ago), 2024-12-12 05:59:24 +0900
    • Engine revision 2ba456fd7f
    • Dart version 3.7.0 (build 3.7.0-209.1.beta)
    • DevTools version 2.41.0

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/ray/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.94.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 15.1.1 24B2091 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 15.1.1 24B2091 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 131.0.6778.140

[✓] Network resources
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions