From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4828F3858D3C for ; Tue, 18 Oct 2022 00:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4828F3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666054614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/IHCibxsbuxyUWBKTnKfvL5xmtWl7a4QbwPcVd9SxGM=; b=EzA6Pxp+H/IGNOFpoT4lcWdHQE+HPzFcjvTEw9eg17Jtm0tBJxtjG1PUB/+pc86HKPGq60 BHavOIpUA1rlrdgDrliTtEAtDH9r8+z/1XKxnmGx1in+trVqxgHVSyQ+XCsqzxZp1mYiNp H1gmBpVmR+0uZPZ5N2QZAMr/XYSCHAo= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-194--tLF5UPqPqG8Wg14XeaWRg-1; Mon, 17 Oct 2022 20:56:53 -0400 X-MC-Unique: -tLF5UPqPqG8Wg14XeaWRg-1 Received: by mail-qk1-f200.google.com with SMTP id x16-20020a05620a449000b006eecf2d621eso8818876qkp.16 for ; Mon, 17 Oct 2022 17:56:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/IHCibxsbuxyUWBKTnKfvL5xmtWl7a4QbwPcVd9SxGM=; b=jAWHha+TRE7cml9BYCypWur7PEmWo1tLvMPCp2g1KsF8eRJCTxvgs7woaPb/IUlVHT HDJqSn3EXipROhkgJCFVBE00UgKznxzzI1pPaTdr2qLiXcmajSfQs4pkDPKrqW3YQJKV E9j1IkhRbDskMqsObNB2QdOGVgGt3YXQ4g2f/AaXoAuS9iMsyslft7a+OjPKL5JES3Nn 8JmOoT5mK8ApTOXdkh1EYZjO3O+EaWcCfweH3EORn4HGWrxb13uZQIeoXr0ymi+fVPO6 rhVEIhw/1DChN/DM//+X69IpMB8ecEvilKcvufNuck2L9jz5ayu57w7rEYil1QtCPv0G ruAg== X-Gm-Message-State: ACrzQf26lOG/bD10oKmfXRXIvTpSKJovnmSZ4sPyirVHTU3CiDdNG4uI /VvKMHT0gFdXyIxVzGR72hUCR+Gd7kDTWdbnnvm6emBwHhaoVWfs1jVMKc9TtXHw54lxdJE2Z9v YgrrgCQb5sQSAqn1PlA== X-Received: by 2002:a05:620a:4544:b0:6e2:9feb:4520 with SMTP id u4-20020a05620a454400b006e29feb4520mr222473qkp.543.1666054612613; Mon, 17 Oct 2022 17:56:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6S8rYfXSJ0ymV8gU4rdsj+yHRLucgj4Jq84Kg0TghLQIuWMgz7XXjp2/pbnfnb0QcLI3/WqQ== X-Received: by 2002:a05:620a:4544:b0:6e2:9feb:4520 with SMTP id u4-20020a05620a454400b006e29feb4520mr222461qkp.543.1666054612255; Mon, 17 Oct 2022 17:56:52 -0700 (PDT) Received: from [192.168.1.101] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id bj41-20020a05620a192900b006bb29d932e1sm1127327qkb.105.2022.10.17.17.56.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Oct 2022 17:56:51 -0700 (PDT) Message-ID: <2afc8d88-2c00-a134-7d5d-da6b7c388563@redhat.com> Date: Mon, 17 Oct 2022 20:56:50 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] C++ API database To: Ulrich Drepper , gcc-patches@gcc.gnu.org References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 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