-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
add tests for [hackage] #1416
add tests for [hackage] #1416
Conversation
Hmm, returning up to date when the package name is misspelled seems pretty bad! How about opening an issue at https://github.com/snoyberg/packdeps? If they could provide a way to distinguish them, and that could be resolved fairly quickly, that seems like a good way to go. Maybe they could even add a JSON API? 😀 FWIW the website is able to distinguish the two: http://packdeps.haskellers.com/feed?needle=not-a-package |
I've raised an issue for it: snoyberg/packdeps#35 We'll see where it goes.. In terms of other options:
|
Not sure how your Haskell is.. Perhaps if the issue was " I reckon its time for Plan B. |
I'd love to give this an hour since it sounds like a fun challenge, though I'll resist the temptation. 😀 Worth leaving the issue open in case someone comes along to address it. Meanwhile two requests seems a fine way to handle this. Perhaps we could make the second request to one of his other routes. That way we know the data is in sync between the two checks. e.g. http://packdeps.haskellers.com/licenses/AbortT-mtl <- exists, 200 |
sorted :) |
Looks great! One last change I'd suggest while you're in here: change hackage-deps to dependencies for consistency with the other dependency badges. |
Test failure is unrelated to this PR
|
This came out looking really good. Nice work! |
Note there is no check for the 'not found' case on the
hackage-deps
endpoint.In order to add a not found case, we'd have to add a second API call so that the
hackage-deps
endpoint calls https://hackage.haskell.org/ first to check if the package exists and then makes a subsequent call to http://packdeps.haskellers.com if it does. Is it worth adding that additional overhead to cover the not found case?