[SOLVED] `spago install` doesn't see a package from Pursuit

This looks like a bug in the new spago, but decided to post here first just in case there’s some misunderstanding.

Basically, Pursuit has purescript-halogen-menu package, so am trying to install it. But I’m getting a:

[error] The following packages do not exist in your package set:
[error]   - purescript-halogen-menu, and nor does `halogen-menu`

Steps to reproduce (in terms of terminal commands)

λ mkdir foo && cd foo
λ spago init
[info] Initializing a sample project or migrating an existing one..
[info] Updating package-set tag to "psc-0.15.15-20240909"
Fetching the new one and generating hashes.. (this might take some time)
[info] Generating new hashes for the package set file so it will be cached.. (this might take some time)
[info] Set up a local Spago project.
[info] Try running `spago build`
λ sed -i 's/dependencies = \[/dependencies = \["purescript-halogen-menu",/g' spago.dhall
λ spago install

Expected

No errors

Actual

An error:

[error] The following packages do not exist in your package set:
[error]   - purescript-halogen-menu, and nor does `halogen-menu`

The issue is that you are using a specific package set — psc-0.15.15-2024-09-09 — and so spago install is going to look at that package set when installing dependencies. Unfortunately, halogen-menu was last updated in 2017 so it’s definitely not going to work with such a recent package set. You can always manually add it to your package set so you can install it, but I know it won’t compile.

Oh, I see. Okay, so this is completely unobvious and I presume deserves creating a report. I’d presume what ought to happen is that spago should say something like package X is not present in revision psc-Y you're using. Last known revision that has package was psc-Z. You can add it manually.. This would make it clearer that there’s some sort of implicit versioning going on and it was not a user mistyping the package name, but it’s not installable because of explicit external reason.

…the current situation is especially confusing, because the Pursuit page doesn’t even cursory refer to the existence of “psc”. Although, I think the fix in this case would be more useful inside spago, rather than inside Pursuit package pages. Although, fixing both sides might be an ideal situation.

I think that’s a valuable message for Spago to print. Could you open an issue on the Spago repository?

2 Likes

Sure, I created it here