From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40134 invoked by alias); 20 Jan 2020 10:13:00 -0000 Mailing-List: contact libabigail-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Id: List-Subscribe: Sender: libabigail-owner@sourceware.org Received: (qmail 40124 invoked by uid 89); 20 Jan 2020 10:12:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-18.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: relay10.mail.gandi.net Received: from relay10.mail.gandi.net (HELO relay10.mail.gandi.net) (217.70.178.230) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jan 2020 10:12:49 +0000 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodji@seketeli.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id EE74A240019; Mon, 20 Jan 2020 10:12:44 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 8565918008A5; Mon, 20 Jan 2020 11:12:43 +0100 (CET) From: Dodji Seketeli To: Matthias Maennich Cc: libabigail@sourceware.org, kernel-team@android.com Subject: Re: [PATCH 2/2] writer: completely skip over empty corpora Organization: Me, myself and I References: <20200113144451.46359-1-maennich@google.com> <20200113144451.46359-3-maennich@google.com> X-Operating-System: Red Hat Enterprise Linux Workstation 7.8 Beta X-URL: http://www.seketeli.net/~dodji Date: Wed, 01 Jan 2020 00:00:00 -0000 In-Reply-To: <20200113144451.46359-3-maennich@google.com> (Matthias Maennich's message of "Mon, 13 Jan 2020 14:44:51 +0000") Message-ID: <871rruv3l0.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-q1/txt/msg00031.txt Hello Matthias, Matthias Maennich a =C3=A9crit: [...] > diff --git a/src/abg-writer.cc b/src/abg-writer.cc > index 994a21e28066..ca10af8d5e7e 100644 > --- a/src/abg-writer.cc > +++ b/src/abg-writer.cc > @@ -4378,6 +4378,9 @@ write_corpus(write_context& ctxt, > if (!corpus) > return false; >=20=20 > + if (corpus->is_empty()) > + return true; > + > do_indent_to_level(ctxt, indent, 0); >=20=20 > std::ostream& out =3D ctxt.get_ostream(); > @@ -4411,12 +4414,6 @@ write_corpus(write_context& ctxt, >=20=20 > write_tracking_non_reachable_types(corpus, out); >=20=20 > - if (corpus->is_empty()) > - { > - out << "/>\n"; > - return true; > - } > - > out << ">\n"; This change is OK. It'd be useful to add a note to the comment of the write_corpus function to say that nothing is emitted for an empty corpus. [...] > A corpus that has no symbols contributing to the ABI surface (e.g. > because of an exhaustive suppression), will not contribute in a later > comparison via abidiff and friends. Hence, there is no need for such > entries to appear in the ABI xml representation. This patch completely > suppresses empty corpora. > > * src/abg-writer.cc (write_corpus): completely skip empty > corpora rather than creating an empty entry for them. OK to commit to master with the comment udpate above. Thank you for working on this! Cheers, --=20 Dodji