File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,16 @@ import System.IO (IOMode (..), withFile)
17
17
import System.Process (readProcessWithExitCode )
18
18
19
19
20
+ -- There are a number of reasons why we generate schema documentation like this.
21
+ -- * Having the schema docs with the schema definition in the Haskell file means that the schema
22
+ -- documentation library will error out if a field is deleted from the schema but not the
23
+ -- documentation. If a field is added but not documented, the documentation library will still
24
+ -- add it to the generated documentation but with a blank comment.
25
+ -- * Schema documentation can be generated at any time, but the updated `doc/schema.md` file
26
+ -- should only be committed as part of the release process, so that documentation in the Github
27
+ -- matches the schema version people are likley to be running in the field.
28
+
29
+
20
30
main :: IO ()
21
31
main = do
22
32
args <- getArgs
@@ -51,6 +61,10 @@ docHeader branchName =
51
61
, " ** which may not accurately reflect the version number)"
52
62
]
53
63
, " \n "
64
+ , " **Note:** This file is auto-generated from the documentation in cardano-db/src/Cardano/Db/Schema.hs\
65
+ \ by the command `cabal run -- gen-schema-docs doc/schema.md`. This document should only be updated\
66
+ \ during the release process and updated on the release branch."
67
+ , " \n "
54
68
]
55
69
56
70
docBody :: Text
You can’t perform that action at this time.
0 commit comments