yesod-scaffold
The Yesod scaffolding, with branches for different versions.
If you want to send a pull request affecting all the different flavors, please send it as a pull request against the postgres
branch. The scripts we use for building the scaffoldings automatically merge changes from postgres
to all other branches.
If you have a patch which is backend-specific, please send a pull request to the appropriate branch, with a comment that this change applies only to the specific branch.
Build Process
The code contained by the scaffolding itself is all contained on separate
branches. The master branch contains code for performing merges between these
branches, testing that the branches build correctly, and generating the
.hsfiles used by the stack-template
repository. (Note: the
full list of recognized branches is maintained in the Shared.hs
file on the
master branch.
The basic workflow for this repository is as follows:
-
Changes are made to one of the branches. If the change is intended to be applied to all variants, it should be made to the
postgres
branch (as mentioned above). -
Check out the
master
branch and runstack build
to generate the helper executables. -
Merge the changes from
postgres
to all other branches by runningstack exec yesod-scaffold-merge
. Note that there will often be merge conflicts, which will need to be resolved and then the command rerun until all branches merge successfully. -
Run
stack exec yesod-scaffold-build
to compile and run tests in all branches. You will need some system libraries and to set up some databases for testing. (NOTE: We should consider automating this process and/or using a Docker image for all of this.) After this completes successfully, thehsfiles
directory will be populated. -
The generated .hsfiles should be copied into the stack-templates repo, with
yesod-
prefixed to the names.