How do I reference a local package dependency where the package is in a multi-package workspace?

Spago version: 0.93.22

With the following layout, workspace1 is dependent on lib1 in workspace2. How is the dependency between the two specified in workspace1/spago.yaml?

.
├── workspace1
│   ├── src
│   │   └── ...
│   ├── test
│   │   └── ...
│   ├── ...
│   └── spago.yaml
└── workspace2
    ├── lib1
    │   ├── spago.yaml
    │   ├── src
    │   │   └── ...
    │   └── test
    │       └── Main.purs
    ├── lib2
    │   ├── spago.yaml
    │   ├── src
    │   │   └── ...
    │   └── test
    │       └── Main.purs
    ├── examples
    │    ├── example1
    │    │   ├── spago.yaml
    │    │   └── src
    │    │       └── Main.purs
    │    └── example2
    │        ├── spago.yaml
    │        └── src
    │            └── Main.purs
    └── spago.yaml

With the following:

package:
  dependencies:
  - lib1
workspace:
  packageSet:
    registry: 41.2.0
  extraPackages:
    lib1:
      path: ../workspace2/lib1

the following message was produced:

The following packages do not exist in your package set:

  • lib1

Then path was changed to ../workspace2 with the same result.

1 Like