File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 11- title : Signed Files
22 text : |
33 Generated files are signed to prevent or detect manual modifications of
4- generated code; this can be disabled if required.
4+ generated code; these files can then be regenerated with new content in
5+ the future, or signatures can be disabled to generate 'skeleton' code,
6+ if any future changes will be manual.
57
68 - title : Partially Generated Files
79 text : |
810 Generated code can be marked as containing manually-modifiable
9- sections; you can use hack-codegen to rewrite the rest of the file,
10- and all manual sections will be left unmodified.
11+ sections; you can use hack-codegen to rewrite the rest of the file in
12+ the future, and all manual sections will be left unmodified.
1113
1214 - title : Readable Output
1315 text : |
Original file line number Diff line number Diff line change @@ -38,17 +38,14 @@ require_once(__DIR__.'/../../../vendor/autoload.php');
3838/* END MANUAL SECTION */
3939```
4040
41- While the manual section could be avoided by adding a configuration option to the
42- script generator, this requires putting code into a string, which is generally less
43- preferable than having it as real code.
41+ There alternative approaches, however they generall require putting code into
42+ a string, which is usually less preferable than having it as real code.
4443
4544One of the reasons that partially-generated files are generally discouraged with
4645other frameworks is that major upgrades often require re-creating the files
47- completely, then manually re-doing edits.
48-
49- This isn't the case with Hack Codegen: if a new version of a file contains a manual
50- section with the same 'key' as an old version, the old manual section is copied
51- into the new manual section.
46+ completely, then manually re-doing edits; This isn't the case with Hack Codegen:
47+ if a new version of a file contains a manual section with the same 'key' as an
48+ old version, the old manual section is copiedi into the new manual section.
5249
5350Creating Manual Sections
5451------------------------
You can’t perform that action at this time.
0 commit comments