This PR implements gg — a golden generator executable. It regenerates and updates on disk the content of all projects, scripts and default TOML config. It is useful when doing some massive boring updates (e.g. adding/removing GHC version support). With gg you can just change the main Summoner code and just run crun gg to update all the projects.
The second commit in this PR shows an example of updating years in all projects using gg.
It might be counter-intuitive to use gg to generate tests and then test against tests themselves. But the main idea is that you usually don't use gg after each change. Golden tests ensure that nothing changes unexpectedly. However, when changing e.g. GHC version you expect changes in golden tests. So you can quickly regenerate them, check the diff to verify that the changes look ok and submit them 🙂 If gg generated some unexpected results, you can always clean the mess with git because all the projects under the version control :octocat:
This PR implements
gg
— a golden generator executable. It regenerates and updates on disk the content of all projects, scripts and default TOML config. It is useful when doing some massive boring updates (e.g. adding/removing GHC version support). Withgg
you can just change the mainSummoner
code and just runcrun gg
to update all the projects.The second commit in this PR shows an example of updating years in all projects using
gg
.It might be counter-intuitive to use
gg
to generate tests and then test against tests themselves. But the main idea is that you usually don't usegg
after each change. Golden tests ensure that nothing changes unexpectedly. However, when changing e.g. GHC version you expect changes in golden tests. So you can quickly regenerate them, check the diff to verify that the changes look ok and submit them 🙂 Ifgg
generated some unexpected results, you can always clean the mess withgit
because all the projects under the version control :octocat: