Skip to content
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

hackage-deps: incorrect not found check #1498

Closed
jakubdaniel opened this issue Feb 14, 2018 · 3 comments · Fixed by #1506
Closed

hackage-deps: incorrect not found check #1498

jakubdaniel opened this issue Feb 14, 2018 · 3 comments · Fixed by #1506

Comments

@jakubdaniel
Copy link

hackage-deps claims to check existence of package (say 3d-graphics-examples) by looking for packages that depend on it. If there are none then not found badge is returned, instead of checking the dependencies of 3d-graphics-examples.

@chris48s
Copy link
Member

Thanks for reporting this. I'm not haskell programmer but I did add this error handling.

We had to use a workaround to try and work out if a package is indexed due to snoyberg/packdeps#35 - see #1416 (for discussion on adding the error handling).

My instinct is that we should change from using the /reverse endpoint to the /licenses endpoint as a proxy:
http://packdeps.haskellers.com/reverse/3d-graphics-examples
http://packdeps.haskellers.com/licenses/3d-graphics-examples

As someone more familiar with the haskell community, does that seem reasonable @jakubdaniel ?

@jakubdaniel
Copy link
Author

jakubdaniel commented Feb 14, 2018

Is there a reason why not simply use hackage.haskell.org/package/..., which seems to return 404 too if the package is not known? If the point is to avoid discrepancies between hackage.haskell.org and packdeps.haskellers.com, then the licenses endpoint might do. I am not affiliated with neither though, so don’t take my word for it :).

@chris48s
Copy link
Member

If the point is to avoid discrepancies between hackage.haskell.org and packdeps.haskellers.com,

Yes - this was the situation we're trying to guard against, although I'm unclear whether this is a likely condition. Given Hackage requires all packages to be published under an open source license I've submitted PR #1506 proposing to change to the /licenses endpoint. Hopefully this will be a good solution.

RedSparr0w pushed a commit that referenced this issue Feb 17, 2018
* switch to /licenses endpoint to check if package exists

refs #1498

* trim whitespace from version string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants