Skip to content

[RFE] More descriptive error when spago install isn't finding package #1287

@Hi-Angel

Description

@Hi-Angel

This came up as part of a discussion here.

Apparently, packages posted on Pursuit are getting combined into some sort of a "PSC set" which is then used by spago, and then an arbitrary package may or may not be present in such set. When it isn't, spago install prints:

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

The specifics that I mentioned above are impossible to infer from this message. A user has to know there exists some sort of versioning. A user can't even guess about such thing existing, because if you go to a Pursuit page of a package, you won't see no "PSC"s mentioned. As result, questions of that kind are getting reiterated by new people.

Proposal

When spago install isn't finding a package, it should print (with X, Y, Z being substituted):

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.

Steps to reproduce (in terms of terminal commands)

λ mkdir foo && cd foo
λ spago init
[…]
λ sed -i 's/dependencies = \[/dependencies = \["purescript-halogen-menu",/g' spago.dhall
λ spago install

Expected

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.

Actual

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions