You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The cmake scripts do not rebuild scanners.c from scanners.re #580
A cursory reading of install instructions suggests that both cmake and makefile methods of installation take care of updating scanners.c from scanners.re.
However, the instructions for doing it are not present on cmake scripts, only in the handwritten Makefile.
These files are under version control and updated by cmark contributors. Downstream developers and package maintainers don't have to rebuild these files.
robertocarlosllamashernandez5-code commented on Aug 28, 2025
But specifically Guix is deadly serious about it - they strive to get rid of machine-generated inputs for their build scripts, from "earlier version of this compiler" bootstrap binaries to minified Javascript files.
I think the following two would be helpful for packaging in particular:
a way to quickly remove generated files.
In the change, it is the snippet section.
a way to automatically regenerate files when they are missing/removed, due to the first point.
In the change, it is the (add-before 'configure 'generate part.
I tried to solve the second point and made #630.
I understand this can be bypassed with some adjustments in package recipes, so this is for those who is in a similar situation :)
Activity
jgm commentedon Jul 19, 2025
I guess there are two possible solutions, and I am open to either:
nwellnhof commentedon Jul 21, 2025
scanners.c and some other pieces of generated code are under version control. Users never have to rebuild these files.
AndersonTorres commentedon Jul 22, 2025
Arguably it doesn't matter for end users, but it is important for developers and package maintainers, especially source-based ones..
Anyway, I will try something after refreshing my memory on cmake.
nwellnhof commentedon Jul 22, 2025
These files are under version control and updated by cmark contributors. Downstream developers and package maintainers don't have to rebuild these files.
robertocarlosllamashernandez5-code commentedon Aug 28, 2025
AndersonTorres commentedon Sep 29, 2025
They don't have to, but some want to, and others may even need it.
I do not know about how other distros deal with bootstrappability and Trusting Trust issues, especially given the XZ Incident.
But specifically Guix is deadly serious about it - they strive to get rid of machine-generated inputs for their build scripts, from "earlier version of this compiler" bootstrap binaries to minified Javascript files.
nwellnhof commentedon Sep 29, 2025
I don't think CMake offers a clean way to update generated code in the source tree. I'd simply stick with our current Makefile rules.
nwellnhof commentedon Sep 11, 2026
I still don't understand what this issue is trying to solve and I'd suggest to close it.
gemmaro commentedon Sep 12, 2026
For a future reference, this change for the cmark package definition of GNU Guix shows how to build in a bootstrappable way.
I think the following two would be helpful for packaging in particular:
snippetsection.(add-before 'configure 'generatepart.I tried to solve the second point and made #630.
I understand this can be bypassed with some adjustments in package recipes, so this is for those who is in a similar situation :)