public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Martin Sebor <msebor@gmail.com>, gcc mailing list <gcc@gcc.gnu.org>
Subject: Re: where is PRnnnn required again?
Date: Wed, 7 Jul 2021 17:01:36 -0400	[thread overview]
Message-ID: <CADzB+2=js0M75vq7gaFdTpRuOh6J4hOOXBWxmw3vEk40S1iC=w@mail.gmail.com> (raw)
In-Reply-To: <20210707175142.GB39218@iPadvonndlhumer>

On Wed, Jul 7, 2021 at 1:54 PM Jakub Jelinek via Gcc <gcc@gcc.gnu.org>
wrote:

> On Tue, Jul 06, 2021 at 03:20:26PM -0600, Martin Sebor via Gcc wrote:
> > I came away from the recent discussion of ChangeLogs requirements
> > with the impression that the PRnnnn bit should be in the subject
> > (first) line and also above the ChangeLog part but doesn't need
> > to be repeated again in the ChangeLog entries.  But my commit
> > below was rejected last Friday with the subsequent error.  Adding
> > PR middle-end/98871 to the ChangeLog entry let me push the change:
> >
> > https://gcc.gnu.org/g:6feb628a706e86eb3f303aff388c74bdb29e7381
> >
> > I just had the same error happen now, again with what seems like
> > a valid commit message.  Did I misunderstand something or has
> > something changed recently?
> >
> > Martin
> >
> > commit 8a6d08bb49c2b9585c2a2adbb3121f6d9347b780 (HEAD -> master)
> > Author: Martin Sebor <msebor@redhat.com>
> > Date:   Fri Jul 2 16:16:31 2021 -0600
> >
> >     Improve warning suppression for inlined functions [PR98512].
>
> This states a PR number on the first line
> >
> >     Resolves:
> >     PR middle-end/98871 - Cannot silence -Wmaybe-uninitialized at
> > declaration si
> > te
> >     PR middle-end/98512 - #pragma GCC diagnostic ignored ineffective in
> > conjunct
> > ion with alias attribute
>
> but these are intentionally not considered part of the ChangeLog entry,
> so it isn't specified anywhere and that is why it has been rejected.
>
> The ChangeLog entry must be in a rigid form so that random text in the
> middle
> of the commit message isn't mistaken for start of the ChangeLog entry.
>
> contrib/gcc-changelog/git_commit.py
> has
> author_line_regex = \
>         re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2})\ {2}(?P<name>.*
> <.*>)')
> changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?')
> pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?([0-9]+)$')
> dr_regex = re.compile(r'\tDR ([0-9]+)$')
> star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)')
> and will consider as first line of the ChangeLog part:
>             if (changelog_regex.match(b) or self.find_changelog_location(b)
>                     or star_prefix_regex.match(b) or pr_regex.match(b)
>                     or dr_regex.match(b) or author_line_regex.match(b)
>                     or b.lower().startswith(CO_AUTHORED_BY_PREFIX)):
>                 self.changes = body[i:]
>                 return
> Once something is considered a ChangeLog part, everything after it has
> to be a valid ChangeLog entry format.
> Matching just PR component/NNNNN with random text afterwards at the start
> of line or even somewhere in the middle would trigger any time one talks
> about some
> PR in the description.
>

But this *could* accept ^PR comp/NNNNN - descr$ , it just doesn't currently.

There's certainly a lot of precedent for including the description in the
PR line in ChangeLog files.

I agree we don't want to match a PR number in the middle of the line, or
without the dash.

Jason

      parent reply	other threads:[~2021-07-07 21:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 21:20 Martin Sebor
2021-07-06 21:36 ` Marek Polacek
2021-07-06 21:44   ` Martin Sebor
2021-07-06 22:09     ` Jonathan Wakely
2021-07-07 16:39       ` Martin Sebor
2021-07-07 20:42         ` Jonathan Wakely
2021-07-07 21:35           ` Martin Sebor
2021-07-07 21:53             ` Marek Polacek
2021-07-07 22:18               ` Martin Sebor
2021-07-07 22:24                 ` Jonathan Wakely
2021-07-07 22:58                   ` Martin Sebor
2021-07-07 23:03                     ` David Malcolm
2021-07-08  8:26                     ` Jonathan Wakely
2021-07-08 18:58                       ` Martin Sebor
2021-07-07 22:15             ` Jonathan Wakely
2021-07-07 23:38               ` Martin Sebor
2021-07-07 17:51 ` Jakub Jelinek
2021-07-07 19:01   ` Martin Sebor
2021-07-07 21:01   ` Jason Merrill [this message]

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='CADzB+2=js0M75vq7gaFdTpRuOh6J4hOOXBWxmw3vEk40S1iC=w@mail.gmail.com' \
    --to=jason@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=msebor@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).