Question about Hackage searching

Hi there!

Hackage has a search-by-name option which behaves inconsistenly across packages (and package’s versions). If you press the letter s in a page, it should open a search box ready to type into. The problem is that for some packages it works and for some others it works but not in the main page (maybe there are package in which it doesn’t work at all. Couldn’t find any).

For example:

  • base-4.18.(0|1).0: search utility doesn’t work on the main page, but It does when you click into any module. And it works even out of the module scope… (the behaviour does not replicate in other versions)
  • brick >= 2.1: The same scenario as before
  • brick < 2.1: The search utility works fine in the main page
  • containers: same as before

So my questions are:

  • Is this on purpose?
  • is there any good reason to block searching on the main page when uploading the package to hackage?
  • Is this maintainer’s responsability or hackage’s? (Hence, should I open a ticket warning the maintainer?)
3 Likes

AFAIR it was a bug in some versions of Haddock. In principle, maintainers can regenerate documentation with the latest version and re-upload.

2 Likes

As bodigrim says, this relies on having the right information bundled for hackage in the docs.You can see on each page if it is “docs uploaded by user” or not – if the docs were uploaded by the user, its their responsibility to make sure the in-package search (which is implemented in js / in browser by haddock and bundled with the haddocks) works.

1 Like

@sclv it seems “Quick Jump” is off again, since the latest deployment of Hackage Server. For instance, pressing “S” works at tar: Reading, writing and manipulating ".tar" archive files. (uploaded 2023-12-14) but not at tar: Reading, writing and manipulating ".tar" archive files. (uploaded 2024-01-28).

1 Like

Thanks for pointing this out! We upgraded haddock to the latest, and it appears the latest version of haddock-api (haddock-api: A documentation-generation tool for Haskell libraries) still has the buggy included version of the quick-jump.min.js script, even though the correct version is checked into the github repository for haddock. Perhaps we should roll back? ugh.