-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] More descriptive error when spago install
isn't finding package
#1287
Comments
Thanks for the report! Good error messages are a hard problem! Their author has to lay out enough information to empower the user to tackle the issue at hand, while avoiding being excessively verbose; for this reason a lot of error messages are so dense that they become inscrutable. However, the other side of the spectrum bears the risk of sounding condescending and gets old quick, which may lead to advanced users skimming through the output trying to find some signal in the noise. In this specific case, the error message assumes that the user knows what a "package set" is. Is this a reasonable assumption? I personally think so - the very first section of the docs, the "super quick tutorial" has a short description of what a spago project contains. In there, there's a link to the relevant section of the docs "what's a package set? I don't think the proposed error message is an improvement over the current one - a few reasons:
I wonder if a few links to the relevant docs session (about what a package set is and how to add custom packages) would be enough to help? |
TL;DR: what about this:
It may be reasonable to assume a user at least vaguely aware of what's a "package set". Though not because they read the links you mentioned (which I, as a new user, never heard of, for example), but rather because PureScript unlikely to be the first programming language, and a user likely ± knows how packaging and versioning works in other langs. However, it doesn't help with the problem at hand, which is the discrepancy between what a user sees on Pursuit (i.e. that a package isn't bound to specific "package set(s)", as if it's available everywhere) and what actually happens. And the links you referred to mention nothing about that. So when a message just says "Package X doesn't exist in your package set", the thought "maybe it's a problem with the remote set" will be the last a user would think of. A user more likely to think they mistyped the package name, or maybe gotten into some sort of weird syntax issue… It doesn't help also that Pursuit for some reason writes every package name as
Sorry, I am confused. Yes, indeed I am using 0.21.0 version, however I don't see how could it be legacy when it is literally the latest available release of the PureScript-based Spago rewrite 😅
Oh, I see. So, at this point I read through your link and now I see the complications. The package X may or may not have been expected to be installed from The Registry, and by providing last known package set revision from The Registry we may be confusing users who expected a different source. How about this one:
This would remove the hard dependency of the user to the Pursuit site, now a user can manually check what packages are available. This wouldn't help with the question "Why my package set doesn't have this Pursuit package that I clearly see?", but it at least would hint a user to seek the problem on the remote side.
In this case the specific command Idk how to hint at the discrepancy between Pursuit interface and the actual packages though. |
Btw, I tried creating a commit with the message, but I can't check that it compiles because the current building documentation are obsolete. E.g. running |
Currently there exist confusion due to Pursuit now showing package sets that include a package. IOW it always looks as if every package on Pursuit available on every "package set" from the registry. As result, when a user receives error message from Spago that says that a package wasn't found, unless a user already knows this situation, they unlikely would think it's a problem on the remote side rather than with syntax or something similar. But on the `spago` side we can reduce confusion by showing a user a message hinting that it is possible to enlist available packages with `spago ls packages`. Fixes: purescript#1287
Anyway, I used lsp server to check that there isn't syntax errors, and CI has build checks as well, so I sent a PR. |
Currently there exists confusion due to Pursuit now showing package sets that include a package. IOW it always looks as if every package on Pursuit available on every "package set" from the registry. As result, when a user receives error message from Spago that says that a package wasn't found, unless a user already knows this situation, they unlikely would think it's a problem on the remote side rather than with syntax or something similar. But on the `spago` side we can reduce confusion by showing a user a message hinting that it is possible to enlist available packages with `spago ls packages`. Fixes: purescript#1287
Currently there exists confusion due to Pursuit now showing package sets that include a package. IOW it always looks as if every package on Pursuit available on every "package set" from the registry. As result, when a user receives error message from Spago that says that a package wasn't found, unless a user already knows this situation, they unlikely would think it's a problem on the remote side rather than with syntax or something similar. But on the `spago` side we can reduce confusion by showing a user a message hinting that it is possible to enlist available packages with `spago ls packages`. Fixes: purescript#1287
Currently there exists confusion due to Pursuit not showing package sets that include a package. IOW it always looks as if every package on Pursuit available on every "package set" from the registry. As result, when a user receives error message from Spago that says that a package wasn't found, unless a user already knows this situation, they unlikely would think it's a problem on the remote side rather than with syntax or something similar. But on the `spago` side we can reduce confusion by showing a user a message hinting that it is possible to enlist available packages with `spago ls packages`. Fixes: purescript#1287
Currently there exists confusion due to Pursuit not showing package sets that include a package. IOW it always looks as if every package on Pursuit available on every "package set" from the registry. As result, when a user receives error message from Spago that says that a package wasn't found, unless a user already knows this situation, they unlikely would think it's a problem on the remote side rather than with syntax or something similar. But on the `spago` side we can reduce confusion by showing a user a message hinting that it is possible to enlist available packages with `spago ls packages`. Fixes: purescript#1287
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: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 (withX
,Y
,Z
being substituted):Steps to reproduce (in terms of terminal commands)
Expected
Actual
The text was updated successfully, but these errors were encountered: