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

Re: Documentation/MyFirstObjectWalk: add #include "trace.h" to use trace_printf()

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 29, 2023, 19:28 UTC
Message-ID
<xmqq1qhu9ifp.fsf@gitster.g>
In-Reply-To
<CAJoAoZ=OEfsgkqsag926tH4GEuafX26A09SGZ1vR1uLh2W_4TA@mail.gmail.com>
Emily Shaffer <nasamuffin@google.com> writes:
> Yeah, it's almost certainly stale in MyFirstObjectWalk - there was
> very recently a patch to clean up some headers which probably were
> implicitly including trace.h when I wrote this walkthrough.

We are lucky that we have folks like Vinayak who tried out the examples and then bothered to spend time reporting the failure discovered. What does it take, however, for us to have a bit more automated way to prevent such a breakage that comes from API changes? Is it feasible, for example, to add a test that extracts code snippets from the MyFirstObjectWalk document and try to build the result? Alternatively, we can ship such a set of sample source files somewhere in our tree (e.g. contrib/examples?) and have such a test try to build using the current set of source files, but then we need a mechansim to ensure that the sample source files will not go out of sync with the document.

Thoughts?
Thanks.
Previous: Vinayak DevNext: Emily Shaffer
Message 8 of 10 in “Documentation/MyFirstObjectWalk: add #include "trace.h" to use trace_printf()”
  1. Vinayak DevJun 29, 2023
  2. Emily ShafferJun 29, 2023
  3. Emily ShafferJun 29, 2023
  4. Vinayak DevJun 29, 2023
  5. Emily ShafferJun 29, 2023
  6. Vinayak DevJun 30, 2023
  7. Vinayak DevJun 30, 2023
  8. Junio C HamanoJun 29, 2023
  9. Emily ShafferJun 29, 2023
  10. Junio C HamanoJun 30, 2023

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.