From: Jason Merrill <jason@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] C++ API database
Date: Mon, 17 Oct 2022 20:56:50 -0400 [thread overview]
Message-ID: <2afc8d88-2c00-a134-7d5d-da6b7c388563@redhat.com> (raw)
In-Reply-To: <CAP3s5k_2gsY32htNVE4eGReQdf4M4c+qErwq-E-0XE=_o1G1Mw@mail.gmail.com>
On 9/28/22 12:59, Ulrich Drepper via Gcc-patches wrote:
> Ping. Anyone having problems with this? And the governance of the file?
Hmm, for some reason this didn't show up on my C++ patches filter.
Please do CC me when pinging C++ patches.
> On Mon, Sep 12, 2022 at 1:51 PM Ulrich Drepper <drepper@redhat.com> wrote:
>
>> After my prior inquiry into the use of python as a build tool for
>> maintainers didn't produce any negative comments and several active and
>> even enthusiastic support message I'm going forward with submitting the
>> patch.
>>
>> To repeat the detail, for the generation of the upcoming C++ standard
>> library module and the hints for missing definitions/declarations in the
>> std:: namespace we need a list of standard C++ APIs. The information
>> needed for the two use cases is different but the actual APIs overlap
>> almost completely and therefore it would be a bad idea to have the data
>> separated.
>>
>> We could opt for a file format that is easy to read in awk and writing the
>> appropriate scripts to transform the data into the appropriate output
>> format but this looks ugly, is hard to understand, and a nightmare to
>> maintain. On the other hand, writing the code in Python is simple and
>> clean.
>>
>>
>> Therefore, Jonathan and I worked on a CSV file which contains the
>> necessary information and a Python to create the gperf input file to
>> generate std-name-hint.h and also, in future, the complete source of the
>> export interface description for the standard library module. This mode is
>> not yet used because the module support isn't ready yet. The output file
>> corresponds to the hand-coded version of the export code Jonathan uses
>> right now.
>>
>> Note that in both of these cases the generated files are static, they
>> don't depend on the local configuration and therefore are checked into the
>> source code repository. The script only has to run if the generated files
>> are explicitly removed or, in maintainer mode, if the CSV file has
>> changed. For normal compilation from a healthy source code tree the tool
>> is not needed.
>>
>>
>> One remaining issue is the responsibility for the CSV file. The file
>> needs to live in the directory of the frontend and therefore nominally
>> changes need to be approved by the frontend maintainers. The content
>> entirely consists of information from the standard library, though. Any
>> change that doesn't break the build on one machine (i.e., the Python script
>> doesn't fail) will not course any problem because the output format of the
>> script is correct. Therefore we have been wondering whether the CSV file
>> should at least have shared ownership between the frontend maintainers and
>> the libstdc++ maintainers.
That makes sense; the file could say something to that effect. Or the
CSV file could live in the library directory, or a third directory. And
maybe separate the two generators; it seems like the code shared between
them is pretty small.
>> The CSV file contain more hint information than the old hand-coded .gperf
>> file. So, an additional effect of this patch is the extension of the hints
>> that are provided but given that the lookup is now fast this shouldn't have
>> any negative impact. The file is not complete, though, this will come over
>> time and definitely before the module support is done.
>>
>> I build my complete set of compilers with this patch without problems.
>>
>> Any comments?
Generally, looks good.
The CSV file could use a header row documenting the fields (as well as
the documentation in the script).
> +# This is the file that depends in the generated header file.
s/in/on/
Jason
next prev parent reply other threads:[~2022-10-18 0:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 11:51 Ulrich Drepper
2022-09-28 16:59 ` Ulrich Drepper
2022-10-18 0:56 ` Jason Merrill [this message]
2022-10-18 11:01 ` Ulrich Drepper
2022-10-18 11:04 ` Martin Liška
2022-10-18 11:15 ` Jakub Jelinek
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=2afc8d88-2c00-a134-7d5d-da6b7c388563@redhat.com \
--to=jason@redhat.com \
--cc=drepper@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).