Closed zerbina closed 1 month ago
I'm not sure whether committing the generated modules is a good idea. On the upside:
The downside are that:
I'm currently leaning towards not committing the files, but this would mean that one has to first run nim r koch.nim generate
after cloning the repository in order to be able to compile various executables. Thoughts?
I'm currently leaning towards not committing the files, but this would mean that one has to first run
nim r koch.nim generate
after cloning the repository in order to be able to compile various executables. Thoughts?
If we can have a single bit of metadata in a file that koch
can check on each run, then it could check the metadata and automatically run generate
.
If we can have a single bit of metadata in a file that
koch
can check on each run, then it could check the metadata and automatically rungenerate
.
That would work, though it would still require going through koch
. Maybe that's not too much of a problem -- NimSkull effectively requires one to do the same, after all.
I've excluded the generated files from being committed and extended koch
to regenerate the generated modules when needed.
The up-to-date check is as naive as it can get, with only the existence of the directory being taken into account, though I can foresee this becoming annoying very quickly, since it's easy to forgot to manually run koch generate
after rebasing some branch onto main
(after an update). The command is quick to run, so it'll hopefully not be too much of an issue.
While a proper task graph system with a input/artifact tracking would work and scale a lot better, it's also a whole lot more complex and I don't think it to be necessary at the moment.
Summary
gen-checks
passtool command, for generating a syntax check module derived from a language grammargenerate
command tokoch
Details
Passtool
passtool
.verify
only performs the grammar verification;gen-checks
generates the syntax check modulesCheck Integration
Koch
generate
command, for generating the language-derived modulespasstool gen-checks
prior to building programs that require the generated modulesCI
passtool
invocationsFixes
pass3
tests violating theL3
grammar