-
Notifications
You must be signed in to change notification settings - Fork 81
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
Ignore missing .haddock files when generating documentation #362
Conversation
tests/ghc.nix
Outdated
@@ -6,6 +6,7 @@ let haskellPackages = pkgs.haskell.packages.ghc822.override { | |||
overrides = with pkgs.haskell.lib; self: super: rec { | |||
lens-labels = super.lens-labels_0_2_0_1; | |||
proto-lens = super.proto-lens_0_3_1_0; | |||
libc = import ./haddock/libC.nix self pkgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be solved differently; my suggestion is creating a different ghcWithPackages
for the tests.
yay
|
This is ready for review, but it still needs a solution for how to handle the |
@guibou do you have a good solution to @Profpatsch's question above? |
I’d use a superset of packages for the tests, where we can add more stuff when we need it. |
Well done. I'm OK with your "hack" in the However I'll had more documentation inside |
Yes, after studying the source code a bit more it is now clear to me that the
We can switch to an existing |
fa9d780
to
317914d
Compare
Added two small comments to |
LGTM. You convinced me with the "small" example (which is, in fact, bigger than a oneliner pulling a package from hackage ;) |
@mboes If you have no further corrections, we can merge. |
317914d
to
972c504
Compare
Added a changelog entry, being a good citizen. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but CI needs to go green.
cb2b7ef
to
a65d39a
Compare
972c504
to
55e7523
Compare
When referencing a nix `haskellPackages` library that uses `dontHaddock` to ignore broken upstream documentation generation, the `.haddock` file is not generated, so haddock fails for our bazel build. The `libc` import in `tests/ghc.nix` is temporary, it needs a better solution.
This adds a simple skip if the `.haddock` file is missing. ``` $ bazel test //tests/haddock INFO: Analysed target //tests/haddock:haddock (0 packages loaded). INFO: Found 1 target and 0 test targets... INFO: From HaskellHaddock //tests/haddock:haddock-lib-b: Warning: LibB: could not find link destinations for: LibCType Warning: haddock missing for package libc Target //tests/haddock:haddock up-to-date: bazel-bin/tests/haddock/haddock/testsZShaddockZShaddock-lib-deep-1.0.0 bazel-bin/tests/haddock/haddock/testsZShaddockZShaddock-lib-a-1.0.0 bazel-bin/tests/haddock/haddock/testsZShaddockZShaddock-lib-b-1.0.0 bazel-bin/tests/haddock/haddock/index INFO: Elapsed time: 1.970s, Critical Path: 1.82s ```
55e7523
to
7ec4986
Compare
Fixes #335.
For now only a test reproducing the issue: