cmark icon indicating copy to clipboard operation
cmark copied to clipboard

The cmake scripts do not rebuild scanners.c from scanners.re

Open AndersonTorres opened this issue 5 months ago • 7 comments

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.

AndersonTorres avatar Jul 19 '25 13:07 AndersonTorres

I guess there are two possible solutions, and I am open to either:

  • clarify the docs so that it's clear you have to use make when you modify scanners.re
  • add something to the cmake script that handles this

jgm avatar Jul 19 '25 17:07 jgm

scanners.c and some other pieces of generated code are under version control. Users never have to rebuild these files.

nwellnhof avatar Jul 21 '25 19:07 nwellnhof

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.

AndersonTorres avatar Jul 22 '25 01:07 AndersonTorres

These files are under version control and updated by cmark contributors. Downstream developers and package maintainers don't have to rebuild these files.

nwellnhof avatar Jul 22 '25 10:07 nwellnhof

Oye quieres ver otro salgo todo desnudo y con la verga bien parada amor 🙈🔥😋

  • Image

  • [ ]

``https://github.com/robertocarlosllamashernandez5-code/Meta-Spatial-SDK-Samples/tree/10f9c7e6bf379d8e251b00432c26dae32ed1a8f1/.github/workflows

Downstream developers and package maintainers don't have to rebuild these files.

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.

AndersonTorres avatar Sep 29 '25 01:09 AndersonTorres

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 avatar Sep 29 '25 09:09 nwellnhof