From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 223B7383B82C for ; Wed, 7 Jul 2021 19:01:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 223B7383B82C Received: by mail-ot1-x32e.google.com with SMTP id 7-20020a9d0d070000b0290439abcef697so3287570oti.2 for ; Wed, 07 Jul 2021 12:01:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=H1QrhM1rcqEyMiNvU5jSmkOPO9c25YenWYwOnfu0gyE=; b=D0VAHMOfCKWZEjliS0X1NcABycF+XxqxcVMl23JYLl6lIAdf5cXKHeTNliO2BA9XeV A5ZQFxIuR2WRIWTjDo1+D8blDCq3Xgqe71/2k64OCjBvSWjcWC2CYNKB3rq0f5qbNzqp Hxa7CPwti7kYRvHJoM3ZqL1rQK0IuOJW14BWv85z4eGF+ty12bGlfaTVKlDepV4bGAQI RJYzRJb/Lv16jr6foDhgOjwdC836Cbg+LxAIZRFqtqn7XeF/hW6PTZ9l9rEzXrgN7Uky UD7PsXc25zTsbj1Ec5GZr4i4C+yqp7elGfU9kBFOe3HbbhzItMSmOEcUzFbtw/ZZYllA E+pw== X-Gm-Message-State: AOAM532AgzDrFfiNBzMS3obtj4ex23drwVtRZnECtG1uV0nG7lDActs8 cThYdtG2Fz7kEVEfThnDun1hNWA6rv0= X-Google-Smtp-Source: ABdhPJzVYHgiqoKtqIclYQVCbHhzco0dGPyCHvJ0/4wdR4mc/PtirT9sS0On97RydHTpGWVRszgmzA== X-Received: by 2002:a05:6830:16d0:: with SMTP id l16mr20850205otr.39.1625684469299; Wed, 07 Jul 2021 12:01:09 -0700 (PDT) Received: from [192.168.0.41] (75-166-102-22.hlrn.qwest.net. [75.166.102.22]) by smtp.gmail.com with ESMTPSA id h96sm168728oth.25.2021.07.07.12.01.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 12:01:09 -0700 (PDT) Subject: Re: where is PRnnnn required again? To: Jakub Jelinek Cc: gcc mailing list References: <20210707175142.GB39218@iPadvonndlhumer> From: Martin Sebor Message-ID: <577ed767-7b4f-76bc-39b1-25b84f74a6a6@gmail.com> Date: Wed, 7 Jul 2021 13:01:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20210707175142.GB39218@iPadvonndlhumer> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 19:01:11 -0000 On 7/7/21 11:51 AM, Jakub Jelinek 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 >> 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. But the PRs are used to update Bugzilla, right? E.g., this commit: https://gcc.gnu.org/g:6d3bab5d5adb3e28ddb16c97b0831efdea23cf7d updated both of: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98512#c12 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98871#c7 (but not ChangeLogs). So why can't they also be used to update the ChangeLog entries? > > 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. If it's okay for the PR lines to be used to update Bugzilla why is it not also okay to use them to update ChangeLogs? Or to put it differently: can we change the script to do both? I can't be the only one who finds this onerous and confusing. Martin > > contrib/gcc-changelog/git_commit.py > has > author_line_regex = \ > re.compile(r'^(?P\d{4}-\d{2}-\d{2})\ {2}(?P.* <.*>)') > changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?') > pr_regex = re.compile(r'\tPR (?P[a-z+-]+\/)?([0-9]+)$') > dr_regex = re.compile(r'\tDR ([0-9]+)$') > star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') > 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. > >> >> gcc/ChangeLog: >> >> * diagnostic.c (get_any_inlining_info): New. >> (update_effective_level_from_pragmas): Handle inlining context. >> (diagnostic_enabled): Same. >> (diagnostic_report_diagnostic): Same. >> * diagnostic.h (struct diagnostic_info): Add ctor. >> (struct diagnostic_context): Add new member. >> * tree-diagnostic.c (set_inlining_locations): New. >> (tree_diagnostics_defaults): Set new callback pointer. > > Jakub >