purescript / spago

🍝 PureScript package manager and build tool
BSD 3-Clause "New" or "Revised" License
792 stars 132 forks source link

Pedantic packages flag ignoring local packages #1281

Open onslaughtq opened 2 months ago

onslaughtq commented 2 months ago

With the latest version of spago, 0.93.39, we are having an issue with using pedantic packages. It is reporting that packages, which are defined in the same repo are not needed.

Our setup is

- packageA
|  -- src/
| -- spago.yaml (with a workspace section)
- packageB
| -- src/
| -- spago.yaml (also with a workspace section)

Our packageA lists packageB as a dependency in the package sectionand also includes a reference topackageB` as an extra package in the workspace, i.e.

package:
  dependcies:
    -packageB
workspace:
  extraPackages:
    packageB:
      path: ../packageB

With this setup, packageB is now being listed as unused, even though it is definitely used by package A.

f-f commented 2 months ago

Would you be able to put together a small example repo that demonstrates the issue so I can have a look at it?

onslaughtq commented 2 months ago

I have published a branch pedantic-packages-broken to https://github.com/onslaughtq/spago-test that can be used as an example.

f-f commented 2 months ago

Thanks! I can replicate the issue - not sure where it's coming from, but it is a bug