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

Include standalone haddock derivation for a project #737

Open
michaelpj opened this issue Jul 1, 2020 · 5 comments
Open

Include standalone haddock derivation for a project #737

michaelpj opened this issue Jul 1, 2020 · 5 comments
Labels
preserved Keep stale bot away

Comments

@michaelpj
Copy link
Collaborator

This would require a bit of hacking, but I think probably worth it (see e.g. #735).

We can copy my hack in https://github.com/input-output-hk/plutus/blob/master/nix/haddock-combine.nix, however I think we should:

  • Rewrite it in a better language (maybe just Python)
  • Deal with the remaining store references (optionally?)

For the latter one, I can see two approaches:

  1. Copy any store paths which are referenced in URLs into a "fake store" directory in the bundle, and rewrite any paths to point to that directory. We'd have to do this repeatedly, and it would use up lots of space, but if we want it to be standalone I think it's what we need to do.
  2. Point them to Hackage where possible (maybe fall back to 1. if we can't find the package version).

Related issues so I remember:

Support in cabal: haskell/cabal#5383
Support in haddock: haskell/haddock#1086, haskell/haddock#1126
Existing standalone-haddock tool is outdated: ktvoelker/standalone-haddock#30

@michaelpj michaelpj changed the title Include standalone haddock derivation Include standalone haddock derivation for a project Aug 11, 2020
@michaelpj
Copy link
Collaborator Author

Maybe haskell/haddock#1277 will help if/when it gets in.

@stale
Copy link

stale bot commented Sep 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 28, 2022
@michaelpj
Copy link
Collaborator Author

Could use haskell/cabal#8162 now, potentially. Although I don't think it's in a released cabal version.

@michaelpj
Copy link
Collaborator Author

That probably also needs a newer haddock, so may only work with new enough GHCs.

@hamishmack hamishmack added preserved Keep stale bot away and removed wontfix labels Oct 10, 2022
@michaelpj
Copy link
Collaborator Author

We probably can't actually use haddock-project, because that will try and build the haddocks itself. But we should be able to mimic what it does, starting from about here: https://github.com/haskell/cabal/blob/master/cabal-install/src/Distribution/Client/CmdHaddockProject.hs#L252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preserved Keep stale bot away
Projects
None yet
Development

No branches or pull requests

2 participants