Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119362 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64726 invoked from network); 20 Jan 2023 10:17:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jan 2023 10:17:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8DBA81804B4 for ; Fri, 20 Jan 2023 02:17:49 -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.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 138.201.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from swift.blarg.de (swift.blarg.de [138.201.185.127]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 20 Jan 2023 02:17:48 -0800 (PST) Received: from swift.blarg.de (swift.blarg.de [IPv6:2a01:4f8:c17:52a8::2]) (Authenticated sender: max) by swift.blarg.de (Postfix) with ESMTPSA id EAB6641294; Fri, 20 Jan 2023 11:17:47 +0100 (CET) Date: Fri, 20 Jan 2023 11:17:46 +0100 To: Jakub Zelenka Cc: internals@lists.php.net Message-ID: References: <192ba7b6-dcf0-e2da-c99e-cbad40519e27@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [PHP-DEV] RFC: rules for #include directives From: max+php@blarg.de (Max Kellermann) On 2023/01/20 10:53, Jakub Zelenka wrote: > I'm afraid it's too late for PHP. It's never too late. Don't give up PHP :-) PHP is an old code base. I want to help modernize it. > As it was said, this is problematic for bug fixes when merging up > and it's extra hurdle for maintainers - read this will slow down the > development. Can I do anything to help with those merges? > Also this is not something I would like to see in a minor version bump even > though we can break ABI in that version but in general we try to introduce > as little changes as possible for extensions. If anything it should at > least wait for the next major version bump when extension devs expect more > work to be done. What about: let's branch PHP 8.3 out, and declare master will become 9.0. (Or create a new branch for 9.0 and let 8.3 stay in master; branches names doesn't matter, only the idea matters.) I volunteer to do regular (daily?) merges from the 8.3 branch to the 9.0 branch, and fix all the problems that may occur. > I think comments are more useful in the actual header to explain > what it is for which can be done in a few lines. It can be more > detailed and doesn't need to be repeated... I agree with that part. More documentation for headers is useful. As I said in another reply, I feel those comments are only really useful for those large and obscure catch-all headers such as "zend_types.h". Check my "zend_result.h" commit - it makes lots of my comments disappear, because suddenly the #include directive becomes self-explaining. > - some of the removed headers from libc should be kept as there's > just a small benefit in removing them (e.g. errno.h) There is a benefit in removing them; improved compile times and reduced namespace pollution (which is a theoretical benefit which is probably not valued by all). But the benefit of keeping it is only source compatibility with buggy extensions. And source compatibility with buggy extensions can be had by moving those #include directives to "php_compat.h", with a way for "good" extensions to opt out of the bloat. If you believe source compatibility even with "bad" extensions is utterly important, I'll consider that in my submissions, and will consider all build breakages as regressions that need to be fixed in PHP (e.g. php_compat.h). I don't have a real opinion on that, I'll accept whatever you decide and will help implement it. Max