Skip to content

Ambiguous package name for local and remote package #335

Answered by blaugold
FaFre asked this question in Q&A
Discussion options

You must be logged in to vote

In short, no.

The reason is not specific to Melos, though. Within the dependencies of a package (including transitive ones), all package names must be unique. Otherwise, package imports would be ambiguous.

I'm wondering why version solving is failing. I would expect compilation to fail. How are you depending on the local package? If you are using path dependencies like below, Melos does not even do anything to override dependencies.

dependencies:
  local:
    path: ../local

For purely local packages that never get published, you could use this shorter syntax.

dependencies:
  local: any

With this, Melos would add the overrides for you, while path dependencies are just left as is.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@FaFre
Comment options

@FaFre
Comment options

@blaugold
Comment options

Answer selected by FaFre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants