Skip to content

Melos project with multiple pubspec.yaml files #51

Description

@fstof

Melos workspaces now require a pubspec.yaml file in the root.

When fixing imports it seems the extension is finding both my app's pubspec and the melos workspace's pubspec and cant decide which one the relative import should be based on

Expected to find a single pubspec.yaml file above file:///xxx/projectX/app/lib/main.dart, 2 found.

projectX is the melos workspace with pubspec.yaml and then app is one of the "packages" defined in melos.yaml

melos workspace pubspec content

name: projectx_workspace

environment:
  sdk: '>=3.0.0 <5.0.0'

dev_dependencies:
  melos: ^3.0.1

partial app pubspec content

name: projectx
description: A Very Good Project created by Very Good CLI.
version: 1.0.0+1
publish_to: none

environment:
  sdk: '>=3.0.0 <4.0.0'

dependencies:
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions