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

--hoogle flag of haddock-project makes no difference #10630

Open
ozkutuk opened this issue Dec 9, 2024 · 6 comments
Open

--hoogle flag of haddock-project makes no difference #10630

ozkutuk opened this issue Dec 9, 2024 · 6 comments
Labels
attention: pr-welcome cabal-install: cmd/haddock-project re: cabal's own flags Concerning inconsistencies or feature requests for existing or new Cabal / cabal-install flags. type: bug

Comments

@ozkutuk
Copy link
Contributor

ozkutuk commented Dec 9, 2024

Describe the bug
I am not exactly sure what the expected outcome of cabal haddock-project --hoogle is, but from what I can tell, the --hoogle flag makes no difference at all.

To Reproduce
Steps to reproduce the behavior:

$ cabal haddock-project --output=docs
$ cabal haddock-project --output=docs-hoogle --hoogle
$ meld docs docs-hoogle  # or any other diff tool that can diff directories

Expected behavior
--hoogle flag should have an effect

System information

  • Operating system: NixOS
  • cabal: 3.12.1.0
  • ghc: 9.6.5
@ulysses4ever
Copy link
Collaborator

Cc @coot

@coot
Copy link
Collaborator

coot commented Dec 9, 2024

I don't use hoogle myself, so it would be nice to get a contribution from sb who knows what to expect 😉.

@ulysses4ever
Copy link
Collaborator

Oh, so that's another instance of a flag not implemented but silently swallowed. Unfortunately, it's a common issue that we have in Cabal code base after the introduction of v2 interface.

PRs welcome for implementing cabal haddock-project --hoogle.

@ulysses4ever ulysses4ever added the re: cabal's own flags Concerning inconsistencies or feature requests for existing or new Cabal / cabal-install flags. label Dec 10, 2024
@ozkutuk
Copy link
Contributor Author

ozkutuk commented Dec 10, 2024

I was thinking maybe cabal haddock-project --hoogle could generate a single hoogle database for all the packages involved rather than individual databases for each package (like cabal haddock --haddock-hoogle does). However, this doesn't seem necessary; pointing hoogle to the top-level documentation directory works just fine, AFAICT it collects all the hoogle databases from each individual package:

$ hoogle generate --database=db.hoo --local=docs/
# the generated database has all the packages, can be observed by running a server:
$ hoogle server --local --database=db.hoo

Maybe the best thing to do is to remove the --hoogle flag from haddock-project altogether? (or maybe @kokobd has some ideas to integrate some stuff from cabal-hoogle under this flag?)

@ulysses4ever
Copy link
Collaborator

Maybe the best thing to do is to remove the --hoogle flag from haddock-project

My previous message was trying to suggest that it’s easier said than done.

@coot
Copy link
Collaborator

coot commented Dec 13, 2024

I was thinking maybe cabal haddock-project --hoogle could generate a single hoogle database for all the packages involved rather than individual databases for each package (like cabal haddock --haddock-hoogle does).

Yes, that's the right way to do it for haddock-project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: pr-welcome cabal-install: cmd/haddock-project re: cabal's own flags Concerning inconsistencies or feature requests for existing or new Cabal / cabal-install flags. type: bug
Projects
None yet
Development

No branches or pull requests

3 participants