If nobody objects, I'll announce the start of voting on February 1st.
That's today.
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanup
Original discussion: https://news-web.php.net/php.internals/119272
[Reposting this to create a new thread; thanks Tim for the hint.]
Hi
If nobody objects, I'll announce the start of voting on February 1st.
That's today.
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanupOriginal discussion: https://news-web.php.net/php.internals/119272
I just notice that the position in the overview page will also need to
be updated:
Best regards
Tim Düsterhus
Hi
If nobody objects, I'll announce the start of voting on February 1st.
That's today.
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanupOriginal discussion: https://news-web.php.net/php.internals/119272
Something about the vote as set up has bothered me since voting started
and I believe I just realized what it is:
I feel like what's being voted on is ambiguous and depending on how the
voter interprets it, the vote also violates the voting rules.
This is specifically about the first vote titled "Should #include
directives be cleaned up?":
The vote as it is worded technically does not make a statement on the
inverse: If the vote is declined, it does not mean that #include
directives may not be cleaned up. Instead the status quo would be
preserved. To my understanding the status quo is "depends on a
case-by-case basis", because we do not currently have any guidelines
regarding #include.
However based on the discussion of the RFC I believe that voters may
have assumed that a "No" means "A cleanup is not allowed", because
several participants expressed an active aversion to a cleanup during
the discussion. As for myself I've certainly had that understanding when
casting my vote.
This interpretation would be in violation of the voting process, because
the status quo would be changed no matter the results of the RFC, but
the two options would not be equal: Disallowing a clean-up would require
33% of votes, whereas allowing clean-up would require 66% of votes. The
status quo "decide on a case by case basis" would no longer be legal
even without a clear agreement.
If the results of the RFC are going to be interpreted according to the
second possible interpretation, then I believe that to be actively
harmful: It would disallow removing #include directives entirely and
more generally it would prevent any type of refactoring. I find it only
natural to "clean up after myself" when moving stuff around. An example
would be PHP 8.2's ext/random where several functions moved into a
different extension. Any includes specific to those moved functions
would need to stay where they were.
As one of the persons listed as a maintainer of ext/random I was also
thinking about splitting the 'php_random_uint128_t' implementation into
a separate header file to keep php_random.h neat and tidy, because the
128 Bit integer operations are only used for the pcgoneseq128xslrr64
engine. Of course I would've coordinated that change with zeriyoshi as
the other listed maintainer.
Best regards
Tim Düsterhus
If nobody objects, I'll announce the start of voting on February 1st.
That's today.
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanupOriginal discussion: https://news-web.php.net/php.internals/119272
[Reposting this to create a new thread; thanks Tim for the hint.]
--
To unsubscribe, visit: https://www.php.net/unsub.php
Hello,
I've voted in favor of the RFC because of the code-cleaning,
tech-debt-reducing improvements to code readability.
Additionally, PHP-SRC should adopt some suitable Clang-format rules
and gradually integrate them into the code.
BTW, merging from PHP 8.1 up is not problematic. Git diff only looks
at a few lines of code above and below. Not the top of the file.
I've voted in favor of the RFC because of the code-cleaning,
tech-debt-reducing improvements to code readability.
Exactly my point, and I'm surprised by the resistance.
Not only surprised, but also disappointed that many have voted against
code cleanup, but where have those people been when this was being
discussed?
Matthew said there had been "chatter from a number of folks after the
changes were merged about builds no longer compiling", but was not
able to render that more precisely.
None of that was discussed on GitHub nor here on php-internals. I
have to question whether these build breakages even exist.
(Other than the DTrace build failure which happened because one line
was missing, but that's a fact and not "chatter", and one bug reporter
and not "a number of folks". Let's put this dead horse to rest.)
BTW, merging from PHP 8.1 up is not problematic. Git diff only looks
at a few lines of code above and below. Not the top of the file.
This was the only counter-argument ever discussed here, and I'm
puzzled that the imagination of merge conflicts scares so many people.
About a kind of change that is unlikely to cause one.
Any code change can cause a merge conflict, but include cleanups are
the least likely cause of all, because include directives are almost
never touched in bugfix-only branches.
Is that all, or is there another, yet unnamed reason why there's so
much resistance? The hearsay about build failures?
There are 3 more days to vote, and it's a tie currently - means 9
"YES" votes missing for supermajority or else the RFC gets rejected.
That rejection would not only be a missed chance to modernize the PHP
code base, but also a sign to potential PHP contributors that the PHP
maintainers don't value clean code. This is unsettling.
Imagine how this will overshadow future attempts to remove historical
cruft from a decades-old code base, because the counter-arguments
apply the same to any kind of code cleanup. As any decades-old code
base, there's a lot of historical cruft in PHP which gets in the way
all the time, much more than a hypothetical one-time merge conflict.
Historical cruft keeps piling up if you don't keep cutting it down all
the time.
Cleaner code is easier to read and understand, which makes existing
bugs easier to fix and makes new bugs less likely to be added. That
outweighs, in my opinion, all the possible disadvantages that the
process of code cleanup could possibly have, by orders of magnitude.
Max
I've voted in favor of the RFC because of the code-cleaning,
tech-debt-reducing improvements to code readability.Exactly my point, and I'm surprised by the resistance.
Not only surprised, but also disappointed that many have voted against
code cleanup, but where have those people been when this was being
discussed?Matthew said there had been "chatter from a number of folks after the
changes were merged about builds no longer compiling", but was not
able to render that more precisely.None of that was discussed on GitHub nor here on php-internals. I
have to question whether these build breakages even exist.(Other than the DTrace build failure which happened because one line
was missing, but that's a fact and not "chatter", and one bug reporter
and not "a number of folks". Let's put this dead horse to rest.)BTW, merging from PHP 8.1 up is not problematic. Git diff only looks
at a few lines of code above and below. Not the top of the file.This was the only counter-argument ever discussed here, and I'm
puzzled that the imagination of merge conflicts scares so many people.
About a kind of change that is unlikely to cause one.Any code change can cause a merge conflict, but include cleanups are
the least likely cause of all, because include directives are almost
never touched in bugfix-only branches.Is that all, or is there another, yet unnamed reason why there's so
much resistance? The hearsay about build failures?There are 3 more days to vote, and it's a tie currently - means 9
"YES" votes missing for supermajority or else the RFC gets rejected.
That rejection would not only be a missed chance to modernize the PHP
code base, but also a sign to potential PHP contributors that the PHP
maintainers don't value clean code. This is unsettling.Imagine how this will overshadow future attempts to remove historical
cruft from a decades-old code base, because the counter-arguments
apply the same to any kind of code cleanup. As any decades-old code
base, there's a lot of historical cruft in PHP which gets in the way
all the time, much more than a hypothetical one-time merge conflict.
Historical cruft keeps piling up if you don't keep cutting it down all
the time.Cleaner code is easier to read and understand, which makes existing
bugs easier to fix and makes new bugs less likely to be added. That
outweighs, in my opinion, all the possible disadvantages that the
process of code cleanup could possibly have, by orders of magnitude.Max
Well, the PHP long-term maintainers are just a bit stubborn when it
comes to such changes and probably what concerns them is writing code
styles in stone. We shouldn't conclude that the PHP team as a whole
doesn't care about clean code based on this voting. People just need a
bit of time to grasp the changes and discuss these things over a
longer period. They just care more about the stability of the current
repo and the extensions out there than the cosmetics of the ASCII
characters in files. I agree though, that both sides need to be
improved.
One more question here. Is the iwyu (include-what-you-use) tool used
here to clean up these header files?
I'm assuming something like this could be one day executed:
iwyu --no_fwd_decls --no-comments
Based on this, this is an awesome tool and can improve the code.
I'd say to go hand in hand here and one day later discuss things like
this again to integrate these gradually. Automating is always tricky
on the other hand. Like adding the iwyu step in the build checks.
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanup
Hi,
voting of https://wiki.php.net/rfc/include_cleanup has ended today at
15 UTC.
The majority of voters (52%) voted "Yes" on the primary vote - "Should
#include directives be cleaned up?" - but the required supermajority
for a primary vote was not met. Therefore, the primary vote is
declined.
On the secondary vote "Is it allowed to document an #include line with
a code comment?", 90% of all voters do not want to allow code comments
on #include lines. To fix the PHP code base according to this
decision, please consider merging
https://github.com/php/php-src/pull/10472
The secondary vote "Is it allowed to forward-declare
structs/unions/typedefs?" was clearly rejected as well; 87.5% of all
voters thought forward declarations should not be allowed. There are
numerous unnecessary forward declarations; several of these are
removed by https://github.com/php/php-src/pull/10494 - please consider
merging this PR for compliance with this decision.
Interestingly, of all things, the most intrusive vote ("Is it allowed
to split a large header to reduce dependencies?") got accepted by a
supermajority. I'll assemble a PR with just the header splitting
commits and submit it for merging.
From my minimal #include cleanup PR
(https://github.com/php/php-src/pull/10410), I have removed all
include comments. The RFC failed to meet the supermajority, but I'm
not sure if that means that #include cleanups are now (or still?)
forbidden. Having a majority, but no supermajority sounds like it's
inconclusive, but I don't know what that means and how to proceed.
Max
Voting starts now, please vote on my RFC:
https://wiki.php.net/rfc/include_cleanupHi,
voting of https://wiki.php.net/rfc/include_cleanup has ended today at
15 UTC.The majority of voters (52%) voted "Yes" on the primary vote - "Should
#include directives be cleaned up?" - but the required supermajority
for a primary vote was not met. Therefore, the primary vote is
declined.
(snip)
Interestingly, of all things, the most intrusive vote ("Is it allowed
to split a large header to reduce dependencies?") got accepted by a
supermajority. I'll assemble a PR with just the header splitting
commits and submit it for merging.
Secondary votes are irrelevant if the primary one doesn't pass.
cheers
Derick
Secondary votes are irrelevant if the primary one doesn't pass.
You may be formally correct (or maybe not, because
https://wiki.php.net/rfc/voting doesn't really say that).
In any case, a vote that reaches supermajority (i.e. it would have
been accepted if it had been a separate RFC) is an unambiguous
expression on how the community wants the PHP source code to look
like.
It is safe to say that the PHP community doesn't want any include
comments and forward declarations, but wants to split large headers in
order to reduce header dependencies.
I guess we both don't like the outcome of the vote (for different
reasons), but let's not start lawyering pointlessly, and accept the
community's will.
Max
Hi
Secondary votes are irrelevant if the primary one doesn't pass.
You may be formally correct (or maybe not, because
https://wiki.php.net/rfc/voting doesn't really say that).In any case, a vote that reaches supermajority (i.e. it would have
been accepted if it had been a separate RFC) is an unambiguous
expression on how the community wants the PHP source code to look
like.
Not necessarily. It might've been the case that a voter believes that
include cleanups should not happen, but at the same time believes that
if cleanups happen, then splitting a header is a natural part of such
a cleanup.
The same is true for the secondary vote of the include comments. My
understanding is that the primary concern of the "no" votes is the churn
in the code base. Removing the existing include comments will just
create additional churn and provide no value-add at all. It is perfectly
possible to be both against "include comments" and "actively remove
include comments".
That said I can only summarize the entire RFC, vote and result as
"unfortunate".
As I've said in my previous email from Feb 9, as a maintainer I'm not
sure what a "declined vote" effectively means for me, because the RFC
text and vote description is pretty broad and unspecific. May I perform
a scoped clean up within a single extension (ext/random in my case)? May
I not? Do I need an explicit RFC? I feel like the vote actually made the
situation less clear for me.
Without this RFC I might've just proposed a PR in the future, made sure
to check that I don't unnecessarily break compatibility, requested two
or three reviews and it would likely have been approved, merged and
shipped with whatever version comes next. Now it is much less obvious
what to do or not to do.
Best regards
Tim Düsterhus