Skip to content

support adding a package from a local monorepo #4691

@Abdurrahman98XX

Description

@Abdurrahman98XX

when adding a package from a monorepo (that has linked local packages with versions instead of path prop) it fails solving version, cuz it treats it as a pub.dev hosted

workaround: use dependency_overrides for all linked local packages that a package in a monorepo has and add a path to it

instead of this

  p1:
    path: ../monorepo/p1
  p2:

dependency_overrides:
  p2:
    path: ../monorepo/p2

should be this

  p1:
    path: ../monorepo/p1
  p2:
    path: ../monorepo/p2

a monorepo could be easily identified by the pubspec.yaml prop resolution: workspace
so adding a package from a monorepo outside it, it should resolve all versioned packages inside it as a local not a hosted one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions