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

Re: [PATCH] trace2: increment event format version

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Dec 1, 2021, 15:49 UTC
Message-ID
<9ce9c989-5a8c-1d5c-cc7e-9447760ed110@jeffhostetler.com>
In-Reply-To
<211112.867ddduhly.gmgdl@evledraar.gmail.com>
On 11/12/21 5:33 PM, Ævar Arnfjörð Bjarmason wrote:
Show 14 quoted lines
> 
> On Thu, Nov 11 2021, Junio C Hamano wrote:
> 
>> Josh Steadmon <steadmon@google.com> writes:
>>
>>> On 2021.11.11 15:03, Junio C Hamano wrote:
>>>> Josh Steadmon <steadmon@google.com> writes:
>>>>
>>>>> In 64bc752 (trace2: add trace2_child_ready() to report on background
>>>>> children, 2021-09-20), we added a new "child_ready" event. In
>>>>> Documentation/technical/api-trace2.txt, we promise that adding a new
>>>>> event type will result in incrementing the trace2 event format version
>>>>> number, but this was not done. Correct this in code & docs.
>>>>>
...
Show 6 quoted lines
> 
> On the field itself I also wonder if it's useful at all. I'd think
> anyone implementing a parser for the format would dispatch to a lookup
> handling known keys, so having a version indicating "new keys here"
> seems rather useless.
> 

That may be true, but it is easier to have a version number and allow parsers to ignore it, than it is to not have a version number and at some point in the future require parsers try to figure it out. IMHO.

So far we've only added new event types (cmd_ancestry and child_ready) and everything is in regular JSON forms, so parsing and dispatching is relatively easy and the version number is not really needed. But, if in the future we decide to change the contents within one of those events, then the version number may be significant.

Thanks, Jeff

Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 7 of 9 in “trace2: increment event format version”
  1. trace2: increment event format versionJosh Steadmon, Nov 11, 2021
  2. Junio C HamanoNov 11, 2021
  3. Josh SteadmonNov 11, 2021
  4. Junio C HamanoNov 11, 2021
  5. Ævar Arnfjörð BjarmasonNov 12, 2021
  6. Junio C HamanoNov 12, 2021
  7. Jeff HostetlerDec 1, 2021
  8. Ævar Arnfjörð BjarmasonDec 1, 2021
  9. Josh SteadmonDec 1, 2021

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.