-
Notifications
You must be signed in to change notification settings - Fork 292
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
Create Haddocks from entity documentation comments #1503
Conversation
This is fantastic, thanks! Can you clarify the limitatiion around documenting fields? Can you post the problematic test? That smells like a GHC bug to me, and might be worth reporting upstream. For a test, I'd be happy to see a rendered Haddock that contains the docs - a screenshout would be fine. |
On closer inspection, the limitation only applies to |
Previously, field Haddocks would only be processed if a documentation comment was present on the model. This commit also uses putDoc for both field and model Haddocks, removing the withDecDoc import.
Regarding version bumping, would this change require a minor version bump (to Also, would it be worth addressing #1296 and #1297 (and merging #1505) before releasing this change so that documentation comments are syntactically equivalent to the format supported by Haddock? Alternatively, these issues could be fixed and released in subsequent patch versions if frequent releases aren't a problem. |
This would be a minor version bump, which put be I think I'd be fine releasing this separately from changing the way the comment syntax works. |
You can do either; I generally find that merges make viewing diffs slightly easier on GitHub since I can see "changes since last review," but you're right that it'll get squash/merged into |
This PR adds a flag to
MkPersistSettings
which enables Haddock generation from entity documentation comments. The default isFalse
to avoid any unexpected performance impacts from upgradingpersistent
.Fixes #1462.
Before submitting your PR, check that you've:
@since
declarations to the Haddockpersistent
version2.14.6.0
.stylish-haskell
on any changed files.stylish-haskell
fails on the#if
-#else
-#endif
construct in the import list inTH.hs
as all three preprocessor directives are ignored, resulting in two identifier lists forLanguage.Haskell.TH.Lib
..editorconfig
file for details)After submitting your PR:
(unreleased)
on the Changelog