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
Fix haddock build #355
Fix haddock build #355
Conversation
Recent enough haddock works: |
I'm running the most recently released version of |
Note that you are implicitly asking for me to have less documentation; though I agree that in this case the comments are not so insightful. I don't consider haddocks to be a part of any versioning contract. The failure is due I have mixed feelings. I could make a patch release removing the comments, and another patch release adding them back but dropping older GHC (and accidentally haddock) support. I hope that in next release I'll actually document the constructors of GADTs, then the haddocks won't be that obvious anymore. I co-maintain another package which old haddock cannot handle (and cannot be fixed without actual code changes), and there dropping old GHC support (requires haddock bundled with GHC-8.4) is too early. |
@phadej what about using CPP to conditionally inject those comments? iirc we can test for the haddock version via some CPP macro... for one there this here in /* tool haddock-2.22.0 */
#ifndef TOOL_VERSION_haddock
#define TOOL_VERSION_haddock "2.22.0"
#endif /* TOOL_VERSION_haddock */
#ifndef MIN_TOOL_VERSION_haddock
#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\
(major1) < 2 || \
(major1) == 2 && (major2) < 22 || \
(major1) == 2 && (major2) == 22 && (minor) <= 0)
#endif /* MIN_TOOL_VERSION_haddock */ and iirc there was also a CPP macro emitted by |
That's even worse! I have no idea where haddock gets brought into the picture. All I did was install the most recent version of This seems like a really obvious choice to me. All it takes to solve the significant user pain is remove three words from the documentation that didn't really add much value in the first place. |
It feels obvious as haddocks are short, I blame myself I didn't wrote longer I could live with, everything less won't be accepted. +#if __HADDOCK_VERSION__ >= recentenough
+#define HAS_GADT_HADDOCKS
+endif - :: CommandMethod -- ^ command
+ :: CommandMethod
+#ifdef HAS_GADT_HADDOCKS
+ -- ^ command
+#endif As said, I planned to write more documentation so the diff would be +#ifdef HAS_GADT_HADDOCKS
-- | Commands are not-(read-only)-queries,
-- i.e. cause some side-effect/write on the GitHub side.
-- Therefore 'Command' is always 'RW' (read-write).
+#endif
:: CommandMethod |
FYI
|
I won't merge this until haskell/cabal#5977 is resolved. EDIT: currently we do build haddocks with all GHCs on CI, and CI is green. So, out of principle, I won't fix this haddock issue, until CI actually verifies there are no others. |
It seems the cabal issue has been resolved at the time of this writing? |
@Mergifyio rebase |
Haddock does not allow the caret character here
✅ Branch has been successfully rebased |
This PR is obsolete, since haddock for the code base works from GHC 8.6 on: Line 2 in e619f76
|
Haddock does not allow the caret character here