[RFE] More descriptive error when `spago install` isn't finding package
Nobody has claimed this yet.
- Dominant language
- PureScript
- Stars
- 831
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
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`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with spago.dhall using the provided mkdir, spago init, sed, and spago install commands. Trace how the selected package-set revision and last known package revision are obtained, then verify that a missing package reports both revisions and the manual-add option as shown in the expected output.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100