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

haskell docs: add info about hoogle's --local flag to section 9.5.2.3 #33217

Merged
merged 3 commits into from Jun 12, 2018

Conversation

toonn
Copy link
Contributor

@toonn toonn commented Dec 30, 2017

Relevant section: 9.5.2.3. How to install a compiler with libraries, hoogle and documentation indexes

Since version 5 hoogle servers --local flag solves the problem with links from
http: to file: URIs:

hoogle server --local -p 8080
Motivation for this change

Using the --local flag is easier than the workarounds and not very discoverable.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

security reasons, which might be quite an inconvenience. See [this
page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
security reasons, which might be quite an inconvenience. Since version 5 hoogle
server has a `--local` flag that solves the problem. For older versions see
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe how it solves the problem (by serving the files,) so people know the implications up front?

@jb55
Copy link
Contributor

jb55 commented Dec 30, 2017

btw the hoogle server module does this for you:

ExecStart = ''${hoogleEnv}/bin/hoogle server --local -p ${toString cfg.port}'';
I forgot to document this when I put it together...

@toonn
Copy link
Contributor Author

toonn commented Dec 30, 2017

@jb55 I'm not on nixos, how would one use this, is it just installing it?

@jb55
Copy link
Contributor

jb55 commented Dec 30, 2017

@toonn ah yeah nixos system(d) services are not yet available to non-nixos users.

server has a `--local` flag that solves the problem. For older versions see
[Hoogle](https://www.haskell.org/hoogle/). The `--local` flag makes the hoogle
server serve files from your nix store over http, without the flag it will use
`file:\\` URIs. Note, however, that Firefox and possibly other browsers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You accidentally flipped some slashes here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt like the backslashes were starting to get outnumbered ; )

@toonn
Copy link
Contributor Author

toonn commented Jan 26, 2018

Once ndmitchell/hoogle@759f755d lands this will be less of a lie, so might want to hold off on merging until then : )

@toonn
Copy link
Contributor Author

toonn commented May 22, 2018

The patch was merged and is in a release so this PR is ready to be merged.

@srhb
Copy link
Contributor

srhb commented May 22, 2018

@toonn Cool, could you rebase? There's merge conflicts. :)

toonn added 3 commits May 22, 2018 13:10
Relevant section: 9.5.2.3. How to install a compiler with libraries, hoogle and documentation indexes

Since version 5 `hoogle server`s --local flag solves the problem with links from
`http:` to `file:` URIs:

    hoogle server --local -p 8080
@toonn
Copy link
Contributor Author

toonn commented Jun 12, 2018

@srhb, I rebased a while ago, just pinging so I won't have to rebase again : )

@srhb
Copy link
Contributor

srhb commented Jun 12, 2018

@toonn Thank you, GitHub doesn't ping me when that happens. :)

@srhb srhb merged commit f4df5d6 into NixOS:master Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants