Auto update ChangeLog for binutils+gdb commits?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto update ChangeLog for binutils+gdb commits?

Sourceware - gdb list mailing list
On Wed, May 27, 2020 at 7:29 AM Simon Marchi <[hidden email]> wrote:

>
> On 2020-05-27 10:20 a.m., H.J. Lu wrote:
> > On Wed, May 27, 2020 at 7:10 AM Simon Marchi <[hidden email]> wrote:
> >>
> >> On 2020-05-26 1:07 p.m., H.J. Lu via Gdb wrote:
> >>> Hi,
> >>>
> >>> I had an impression that ChangeLog was auto generated for GDB commits.
> >>> If it is true, should we do the same for binutils commits?
> >>>
> >>> --
> >>> H.J.
> >>>
> >>
> >> No we (GDB) don't do that.  There was a discussion here
> >>
> >>   https://sourceware.org/pipermail/gdb-patches/2020-February/165728.html
> >>
> >> But it didn't go anywhere.  Note that when I actually tried the script, it
> >> didn't produce good results (perhaps because it wasn't designed with C++
> >> in mind).
> >
> > GCC will auto generate ChangeLog entry from git commit message.  Can
> > binutils+gdb do the same?
>
> Can you please explain what this means?  I suspect that we are not talking about
> the same thing.  You mean, still write the ChangeLog entry by hand, but only put
> it in the git commit.  And then a script scrapes all the commit messages in order
> to produce a ChangeLog file?
>

Yes.  I updated the email subject.  Personally, I think it is a good
exercise to document
what changes are in ChangeLog format in commit message.  But adding them to
ChangeLog files is a problem.   If git commit hooks can do it
automatically, it will
be very nice.  GCC will do it now.  Can we do the same?

--
H.J.
Reply | Threaded
Open this post in threaded view
|

Re: Auto update ChangeLog for binutils+gdb commits?

Eli Zaretskii
> From: Tom Tromey <[hidden email]>
> Date: Fri, 29 May 2020 06:15:01 -0600
> Cc: Simon Marchi <[hidden email]>, "H.J. Lu" <[hidden email]>,
>  Binutils <[hidden email]>, GDB <[hidden email]>
>
> I'd also be open to changing the format to something requiring zero
> manual intervention.  For example, if we could have a commit script that
> simply listed the files and didn't require editing in the names of the
> functions.

Having the names of the functions in the log is one of the most
important reasons for following the ChangeLog format.  If it were not
for that reason, we could let people write free-text log messages,
because file names are easily gleaned from the VCS log.
Reply | Threaded
Open this post in threaded view
|

Re: Auto update ChangeLog for binutils+gdb commits?

Tom Tromey-2
Eli> Having the names of the functions in the log is one of the most
Eli> important reasons for following the ChangeLog format.  If it were not
Eli> for that reason, we could let people write free-text log messages,
Eli> because file names are easily gleaned from the VCS log.

If the mklog script works, then the function names are also easily
computed from the diff.

Tom
Reply | Threaded
Open this post in threaded view
|

Re: Auto update ChangeLog for binutils+gdb commits?

Jan Vrany
In reply to this post by Sourceware - gdb list mailing list
On Sat, 2020-05-30 at 13:41 -0600, Tom Tromey wrote:
> > >
> IMO we should optimize for reducing the overhead for regular
> contributors.  Newcomers normally have many things to learn.

Being a newcomer, here's my perspective:

I must admit that dealing with changelogs
(editing them, fixing them, making sure both changelog in
file and in commit message are in sync) is a significant portion
of the time. Fixing / improving the code is usually ~20% of the total
time in my case (another time-consumer are tests, that's different story).
Indeed, I might be exception.

That being said, this is the highest "overhead" of all projects I work
on - not many, though.

My 2c.

Jan

Reply | Threaded
Open this post in threaded view
|

Re: Auto update ChangeLog for binutils+gdb commits?

Martin Liška
In reply to this post by Tom Tromey-2
On 5/30/20 9:35 PM, Eli Zaretskii wrote:

>> From: Tom Tromey <[hidden email]>
>> Cc: Tom Tromey <[hidden email]>,  [hidden email],  [hidden email],
>>    [hidden email],  [hidden email],  [hidden email]
>> Date: Sat, 30 May 2020 13:23:57 -0600
>>
>> Eli> Having the names of the functions in the log is one of the most
>> Eli> important reasons for following the ChangeLog format.  If it were not
>> Eli> for that reason, we could let people write free-text log messages,
>> Eli> because file names are easily gleaned from the VCS log.
>>
>> If the mklog script works, then the function names are also easily
>> computed from the diff.
>
> If all the script does is look at the hunk headers of the diffs, then
> indeed such a script doesn't have any added value.  I thought it did a
> more thorough (and thus more accurate) job than that.
>

It does, it tries to find a function name, macro, struct in a diff hunk
and this name is taken as changed. If nothing like this is found, then
diff header name is used.

Martin
Reply | Threaded
Open this post in threaded view
|

Re: Auto update ChangeLog for binutils+gdb commits?

Eli Zaretskii
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email]
> From: Martin Liška <[hidden email]>
> Date: Mon, 1 Jun 2020 09:39:08 +0200
>
> > If all the script does is look at the hunk headers of the diffs, then
> > indeed such a script doesn't have any added value.  I thought it did a
> > more thorough (and thus more accurate) job than that.
> >
>
> It does, it tries to find a function name, macro, struct in a diff hunk
> and this name is taken as changed. If nothing like this is found, then
> diff header name is used.

How does it handle the frequent case where the change is attributed by
Diff to the previous function because the function's type or argument
list is being modified?

And how does the script decide that "nothing like this is found",
i.e. how does it know that what is in the hunk header is not really a
function name?

Thanks.