NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.4k stars 13.62k forks source link

hoogle itself cannot be built using `ghcWithHoogle` #41279

Open jwiegley opened 6 years ago

jwiegley commented 6 years ago

Pinging @peti, in case this points to an infrastructure problem.

Using this command:

nix-build -E "(import <nixpkgs> {}).pkgs.haskell.packages.ghc822.ghcWithHoogle (p: [ p.hoogle ])"

I get this failure:

[59/140] haskeline... 0.01s
[60/140] haskell-src-exts... 0.14s
[61/140] CHANGES... hoogle: hseToItem failed, Add mode = embed support
CallStack (from HasCallStack):
  error, called at src/Input/Haddock.hs:78:47 in hoogle-5.0.17.3-JaNkzxYhqElLfDqrNAPOm8:Input.Haddock
builder for '/nix/store/hjrpsyksjbkljx3m3qqa5i88qyfhnav6-hoogle-local-0.1.drv' failed with exit code 1
cannot build derivation '/nix/store/97l9cipkyczik471il228sm0nj17xas5-ghc-8.2.2-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/97l9cipkyczik471il228sm0nj17xas5-ghc-8.2.2-with-packages.drv' failed

Granted that since hoogle is included when using ghcWithHoogle this should not be a problem, so I'd marked this issue as low priority, this error surprised me.

ryantm commented 6 years ago

Confirmed this is still a problem with GHC 8.4.3. GHC 8.6.1 fails due to dependency stm missing.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
teto commented 4 years ago

still fails with 2 ghc 865 and 8101

[63/142] CHANGES... 0.01shoogle: hseToItem failed, Add mode = embed support
CallStack (from HasCallStack):
  error, called at src/Input/Haddock.hs:79:47 in hoogle-5.0.17.15-3bxjovPpTuzE6sb4ft3I3A:Input.Haddock
stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

ryantm commented 3 years ago

This still fails:

$ nix-build -E "(import <nixpkgs> {}).pkgs.haskell.packages.ghc8102.ghcWithHoogle (p: [ p.hoogle ])"
nix log /nix/store/vpj9rilszq2w55cq206mp3782hj1wka1-hoogle-local-0.1.drv
warning: unknown setting 'extra-sandbox-paths'
warning: --- SQLiteError ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
executing SQLite statement 'delete from NARs where ((present = 0 and timestamp < ?) or (present = 1 and timestamp < ?))': attempt to write a readonly database (in '/home/ryantm/.cache/nix/binary-cache-v6.sqlite')
importing builtin packages
importing other packages
building hoogle database
Starting generate
[12/150] attoparsec... 0.06s
[18/150] basement... 0.19s
[38/150] cryptonite... 0.13s
[58/150] ghc... 2.43s
[68/150] CHANGES... hoogle: hseToItem failed, Add mode = embed support
CallStack (from HasCallStack):
  error, called at src/Input/Haddock.hs:89:47 in hoogle-5.0.18-1aqpkT3fhSiBxFNWhFULI4:Input.Haddock
stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

ProducerMatt commented 3 weeks ago

This still causes a fail. Perhaps withHoogle could throw an error if the requested package list includes Hoogle itself? That would immediately indicate the needed solution.

$ nix log /nix/store/dah3c3pcshkpvr79ywrmrl7s45csgf0g-hoogle-with-packages.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/dah3c3pcshkpvr79ywrmrl7s45csgf0g-hoogle-with-packages.drv^*'
importing builtin packages
importing other packages
building hoogle database
Starting generate
[21/180] base... 0.54s
[79/180] foundation... 0.08s
[83/180] ghc... 1.94s
[106/180] hoogle... hoogle: hseToItem failed, Add mode = embed support
CallStack (from HasCallStack):
  error, called at src/Input/Haddock.hs:90:47 in hoogle-5.0.18.4-DpPEbFz8gAr5yF6LitRXbE:Input.Haddock