visortelle / haskell-spotlight

VSCode extension for Haskell
https://marketplace.visualstudio.com/items?itemName=visortelle.haskell-spotlight
MIT License
108 stars 3 forks source link

Handle case when there are package dependents, but package itself isn't published to the hackage.haskell.org #14

Closed visortelle closed 2 years ago

visortelle commented 2 years ago

Example of such a package:

https://hackage-ui.vercel.app/package/rts

Screen Shot 2022-01-24 at 4 40 55 PM

On hackage.haskell.org:

Screen Shot 2022-01-24 at 4 41 16 PM
visortelle commented 2 years ago

Looks like it's not a real package, but still need to handle this situation.

https://www.reddit.com/r/haskell/comments/8t77wi/how_does_the_rts_package_work_how_is_it_related/

https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts

yutotakano commented 2 years ago

This also happens if I directly use a Git repository and a pinned commit tag as a dependency as well, such as with my package's opus dependency.

There's not a lot we can do to detect this unfortunately, since the cabal file doesn't indicate anything. Rather, in my package, the Stack build manager is responsible for fetching external dependencies, and I believe Cabal isn't even aware that it's not sourced from Hackage.

Perhaps a 404 is good enough.

visortelle commented 2 years ago

@yutotakano yeah.

404 with a well-descriptive message should be enough.

visortelle commented 2 years ago

Fixed in https://github.com/visortelle/hackage-ui/commit/ff2d125c3f459e6834ddb632440276ecd5da7d74

Better looking error pages will implement later.