ndmitchell / ndmitchell/hoogle
"server --local" behavior in Hoogle 5 interacts badly with Docker hosting
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 803
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
I have dockerized a local Hoogle server container, available here:
https://hub.docker.com/r/jwiegley/hoogle-local/
With Hoogle 4, this works perfectly fine. But with Hoogle 5, the port forwarding no longer works correctly. The thing is, I access the website using http://127.0.0.1:8687 from my machine, but it's not actually a localhost access from the point of view of Hoogle. So with Hoogle 5 I need to add --host, however, this changes the behavior somewhat:
- Just
hoogle server --localis inaccessible now, because I'm connecting through a port forward. This worked in Hoogle 4. hoogle server --host '*'causes all links to appear asfile://links, making them unusable, because I don't have direct file access to the server.hoogle server --local --host '*'rewrites search result links ashttp://127.0.0.1/file/..., but rewrites links within documentation pages ashttp://127.0.0.1/..., without thefile/leader. This makes search links clickable, but documentation links all report"file not found".
As a result, there is no combination that works anymore for Dockerized hoogle-local. This would work if --local --host '*' adds file/ leaders within documentation pages, as well as within search results.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the Docker image and the commands hoogle server --local, --host '*', and --local --host '*', then inspect the server handling for generated links. Verify the result through http://127.0.0.1:8687: search-result and documentation links should both retain the file/ path and work through the forwarded port.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, haskell
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100