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
haskellPackages.servant: stop building documentation #107858
haskellPackages.servant: stop building documentation #107858
Conversation
This update was generated by hackage2nix v2.15.5-37-g13ffc58 from Hackage revision commercialhaskell/all-cabal-hashes@7c122b0.
This update was generated by hackage2nix v2.15.6 from Hackage revision commercialhaskell/all-cabal-hashes@8d62f5b.
This update was generated by hackage2nix v2.15.6 from Hackage revision commercialhaskell/all-cabal-hashes@cb1cd20.
Commit 1998b95 “haskellPackages: update default compiler from ghc 8.10.2 to version 8.10.3” broke Agda because Agda.cabal incorrectly declares a transformers dependency only for ghc < 8.10.3: if impl(ghc >= 8.6.4) && impl(ghc < 8.10.3) build-depends: transformers == 0.5.6.2 if impl(ghc >= 8.4) && impl(ghc < 8.6.4) build-depends: transformers == 0.5.5.0 if impl(ghc < 8.4) build-depends: transformers == 0.5.2.0 leading to this error: src/full/Agda/Utils/Maybe.hs:13:1: error: Could not load module ‘Control.Monad.Trans.Maybe’ It is a member of the hidden package ‘transformers-0.5.6.2’. Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file. Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 13 | import Control.Monad.Trans.Maybe | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This update was generated by hackage2nix v2.15.6 from Hackage revision commercialhaskell/all-cabal-hashes@d89eff1.
haskellPackages.Agda: Fix build for ghc 8.10.2 → 8.10.3 upgrade
@GrahamcOfBorg build cachix haskellPackages.servant haskellPackages.servant-docs haskellPackages.servant-server |
Here's my arguments for completely removing this documentation (as opposed to continuing to bump the documentation hash):
Given that there doesn't seem to be anyone actively keeping up with bumping this hash after every Servant release, and that having old documentation can be very confusing, I think it would be better to just completely remove the documentation generation as I have done in this PR. If someone does feel strongly about providing this documentation from nixpkgs, I'd suggest creating a separate derivation that just contains the documentation. This could be maintained separately from |
Is this documentation hard to be built? Or it is just a matter of updating a hash? |
I find a bit sad to remove it. Can't we hardcode the doc version and assert that the hardocded version matches super.servant.version ? The doc could be made optional so that it doesn't break the build. Putting it in another derivation can be confusing: harder to find and is that a servant package or just the servant doc ? |
It is not hard to build the documentation. The code that I have removed in this PR is responsible for building the documentation. It is relatively straightforward. The only hard part is keeping the hash updated. In #107858 (comment) I try to make the argument that since no one seems to be keeping this hash updated, we should just remove the documentation generation. Although please keep in mind that there are two sets of documentation for Servant. There are the haddocks (https://hackage.haskell.org/package/servant-0.18.2/docs/Servant-API.html), as well as the tutorials site (https://docs.servant.dev/en/stable/cookbook/index.html). This PR is removing the tutorials site, not the Haddocks. Upstream doesn't distribute tutorials site along with the
Yes, we could do that. I think @maralorn tried something like that for some other derivations in We definitely want If there was someone that reliably bumped this servant docs hash, I would be much less eager to remove it. However, in the past couple years, there hasn't been.
Hmm, I can't quite imagine how this would work. How would you go about writing something like this?
I completely agree. Having the documentation be in a separate derivation would be more confusing. However, my argument is that it would be worth it in order to reduce the maintenance burden. If we moved the documentation to a separate derivation, and then someone started always updating the hash in a timely manner, I would feel much better about adding the documentation back to the main (Another possibility would be restructuring the derivations in a way that the ryantm bot would do the updates for us. I'm not sure what would need to happen for this to work.) |
I did stuff like that and it worked. The point is, that I have never done it as a permanent solution only as a temporary reminder as a "fix this once we can". I think putting asserts into the code to break eval on update is a great way to enforce timely action on an issue. But in reality this just means we write it on @peti s todo-list. I assume bumping this hash is around five minutes of work evry time. So this would only be worth it if people actually use this documentation. Do you still @Profpatsch? Because I am pretty sure I wouldn‘t even know about it and just look at it online. An alternative would be to insert something in the doCheck phase that asserts the documentation and package versions match. That would be the cleaner approach. But it would break servant regularly. While noticing and fixing that would be slower, in theory it could have the benefit on not relying alone no petis intervention. |
ba32886
to
c9e5a3f
Compare
Merged in 4827826. |
Motivation for this change
This PR stops including the upstream servant documentation in the
haskellPackages.servant
derivation.Users that want to see the documentation can get it from the servant repo, or read it online: https://docs.servant.dev/en/stable/
This is for #107455.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)