Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119315 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 66504 invoked from network); 18 Jan 2023 15:41:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jan 2023 15:41:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 46EDE180563 for ; Wed, 18 Jan 2023 07:41:06 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Wed, 18 Jan 2023 07:41:06 -0800 (PST) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 8022210C3A9; Wed, 18 Jan 2023 15:41:05 +0000 (GMT) Date: Wed, 18 Jan 2023 15:41:05 +0000 (GMT) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Max Kellermann cc: Kamil Tekiela , internals@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-9373343-1674056465=:23089" Subject: Re: [PHP-DEV] RFC: rules for #include directives From: derick@php.net (Derick Rethans) --8323329-9373343-1674056465=:23089 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 16 Jan 2023, Max Kellermann wrote: > On 2023/01/16 13:38, Kamil Tekiela wrote: >=20 > > What's the impact on other maintainers, especially extension > > maintainers? >=20 > Other maintainers may need to determine which includes they really > need, instead of relying on everything always already there by > including one random zend_* header. Including a "random" zend header also sounds like a great benefit. I=20 shouldn't need to care as an extension author which header enables which=20 internal function(s) for usage. =20 > Extension maintainers may see build failures because, for example, > they forgot to include errno.h but used "errno". This previously > worked because all PHP headers included errno.h even though there was > no reason to. These build failures are bugs in those extensions, and > revealing them is a good thing, even though it seems tedious at first. This is a very naive view of the world. You don't get to decide what is=20 "good for other people". > > Do you see any downsides to your new approach? >=20 =E2=80=A6 > Derick Rethans wrote my idea "adds nothing but clutter", but I guess > he should explain what bothers him; I don't comprehend this, because > from my perspective, I intend to remove clutter. When looking at the commit history, I saw more than a dozen commits=20 doing a small change. That is clutter. Adding forwards declarations for zend_* structs, is clutter. Adding comments that go out of date as to why a header is included is=20 also clutter. > Dmitry Stogov said it's "just a useless permutation", but I can't=20 > understand this argument either. It creates code-churn, which makes merging up fixes from older branches=20 harder.=20 cheers, Derick --8323329-9373343-1674056465=:23089--