git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Hostetler <git@jeffhostetler.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Cc: Josh Steadmon <steadmon@google.com>,
	Jeff Hostetler <jeffhost@microsoft.com>,
	git@vger.kernel.org, Emily Shaffer <emilyshaffer@google.com>
Subject: Re: [PATCH] trace2: increment event format version
Date: Wed, 1 Dec 2021 10:49:29 -0500	[thread overview]
Message-ID: <9ce9c989-5a8c-1d5c-cc7e-9447760ed110@jeffhostetler.com> (raw)
In-Reply-To: <211112.867ddduhly.gmgdl@evledraar.gmail.com>



On 11/12/21 5:33 PM, Ævar Arnfjörð Bjarmason wrote:
> 
> 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.
>>>>>
...
> 
> 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


  parent reply	other threads:[~2021-12-01 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 22:34 [PATCH] trace2: increment event format version Josh Steadmon
2021-11-11 23:03 ` Junio C Hamano
2021-11-11 23:06   ` Josh Steadmon
2021-11-11 23:47     ` Junio C Hamano
2021-11-12 22:33       ` Ævar Arnfjörð Bjarmason
2021-11-12 23:28         ` Junio C Hamano
2021-12-01 15:49         ` Jeff Hostetler [this message]
2021-12-01 15:57           ` Ævar Arnfjörð Bjarmason
2021-12-01 19:56             ` Josh Steadmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ce9c989-5a8c-1d5c-cc7e-9447760ed110@jeffhostetler.com \
    --to=git@jeffhostetler.com \
    --cc=avarab@gmail.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.com \
    --cc=steadmon@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).