git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Separating generated files?

From
CJChristian Jaeger <christian@pflanze.mine.nu>
Date
Oct 15, 2008, 16:45 UTC
Message-ID
<48F61E44.3080900@pflanze.mine.nu>
In-Reply-To
<vpqiqrt3mgs.fsf@bauges.imag.fr>
Matthieu Moy wrote:
> I think the first question is: do you (and why) need to use a version
> control system for generated files?

The project in question is a self-hosting compiler which compiles to C as an intermediary language. Providing the generated C files to users makes installation easy (it avoids the bootstrapping issue). So it's more 'severe' of an issue than just one of for example generating documentation files using a 3rd-party tool.

What may make matters worse, is that there are interdependencies between a number of hand-written C files and the generated files, so it's not always possible to use an older compiler version to reproduce the generated C files for a newer compiler; so if you want to merge newer compiler sources, you may also need the generated files, at least if you want that without fuss. So, there is always a need to somehow transmit the generated files too. I guess that this is easier than code the system in a way to always allow backwards compatibility (I haven't worked on the compiler itself yet, so this is a guess and may need confirmation).

Apart from that, I've found it useful (in another project, writing a document translator) to keep generated files in a VCS (Git) as well (I checked them into the *same* repository as the translator source, even if it felt ugly (for the previously mentioned reasons)), as then when I changed the translator, I could easily see where it had effect on the generated output. It can even serve as a debugging help kind of like a test suite does. This may be the case here, too (again, I'm guessing here).

How are other compiler projects which are bootstrapping via C dealing with this?

Christian.
Previous: Santi Béjar
Message 9 of 9 in “Re: Separating generated files? (Re: Mercurial -> git)”
  1. Nguyen Thai Ngoc DuyOct 15, 2008
  2. Matthieu MoyOct 15, 2008
  3. Michael J GruberOct 15, 2008
  4. Christian JaegerOct 15, 2008
  5. Christian JaegerOct 16, 2008
  6. Santi BéjarOct 16, 2008
  7. Christian JaegerOct 16, 2008
  8. Santi BéjarOct 16, 2008
  9. Christian JaegerOct 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.