Hey everyone,
I started updating, restructuring, and modernising php-src/docs, which
also includes migrating the existing Markdown based php-src/docs-old
into the book. The first step in my prerequisite series of PRs (please
check the PR desc to see the full scope of all PRs) give the current
docs a Markdown facelift:
https://github.com/php/php-src/pull/23368
Why Markdown:
- not yet another syntax to deal with; we all write Markdown
- renderable by default everywhere; including GitHub and IDEs
- less bloated for titles, inline code, prose and such
- we can easily extend it later if we want to
That said, Ilija -- who initially did setup the book 2.5 years ago --
considers the change as "churn" and asked me to better bring it up on
list. I didn't expect this to be a topic fo the list, but here I am. :)**
My Argument:
It's a light ~1,100 line, mechanical diff (see first PR). Though, if we
would not do it in the first PR, we would do it vice versa in the later
PR that integrates php-src/docs-old into the book -- which has pretty
much the exact same amount of lines. So we will have "churn" in one or
the other direction. These docs are so aged, outdated, incomplete that
there will be much more changes over the next weeks and months (see
last PR). Given that, I don't see any reason for holding back because of
"churn". This switch to Markdown reduces lines already by ~100 lines,
just for 17 existing documents. Not to forget, CODING_STANDARDS.md and
CONTRIBUTING.md which have contents that eventually should be integrated
into the book, are also already Markdown.
Where I agree with Ilija is that the reST table syntax is better. The PR
is already updated to use reST for tables -- both can co-exist nicely.
My Opinion
Please allow me this... If we actually want to move things forward, it
would be nice if we would not over-complicate and over-think everything.
Otherwise, things just stagnate and (almost) nothing happens as we see
with this started but never finished initiative. Ilija did a great job,
but it was merged it with the words:
some chapters first just to give an idea of the depth and language
that is expected
So to boil it down, these are internal docs, almost in the same "demo"
state as when they were introduced, not important C code. They were
introduced 2.5 years ago, yet they still have a big "work in progress"
banner, a bunch of todo's inline, and links to 404's (also meant as
todo's) in it. Plus, the overall activity to improve was rather
moderate. The only actual activity was in release-process.md -- which
is already Markdown, and not touched by my PRs at all.
From my own onboarding experience I know how complicated and confusing
things are; I strongly believe this is not the state these docs should
be in.
My Ask
Devs are understandably busy with other things, and no one can or want
to get it done. So here I am, offering myself to help out. Those who saw
my recent contributions might already know that I am interested in
making myself helpful by improving the test suite, CI, and general QA
stuff. I see these docs as a part of it, because A) docs = QA, B) a lot
of test related stuff has to be documented, and C) while I monitor PRs
for test related stuff I often see things pointed out in reviews that
are worth to be documented.
A preview of the "final" state of the prerequisite PR series can be
found here:
https://nicksdot.github.io/docs-restructure-final/
After these prerequisites are merged I can start to cook.
I'd appreciate if I could get everyone's blessing to get this done. 🥷
Cheers
Nick
Hi Nick
Thanks for bringing this up on the list.
Just to state my thoughts officially:
Why Markdown:
- not yet another syntax to deal with; we all write Markdown
reST is pretty popular, so not exactly something esoteric. Sure, I would
also guess that Markdown is more known, but reST is very hard to "learn"
either.- renderable by default everywhere; including GitHub and IDEs
I don't think this holds.
Before:
https://github.com/php/php-src/blob/master/docs/source/core/data-structures/reference-counting.rst
After:
https://github.com/NickSdot/php__php-src/blob/6730bde4ee9ddfe618213441f83af70d49dc347f/docs/source/core/data-structures/reference-counting.rst
The problem here being that this isn't pure reST or Markdown, but MyST.
I'd guess the same goes for IDEs. Switching the names to .md might look
better for a good chunk of the file, but then the reST-like parts won't
render well anymore.
Please allow me this... If we actually want to move things forward, it
would be nice if we would not over-complicate and over-think
everything. Otherwise, things just stagnate and (almost) nothing
happens as we see with this started but never finished initiative.
I don't think "let's not overcomplicate" should be an argument for
"let's not question changes". Asking for good reasons for the switching
from one stack to another seems reasonable.
So to boil it down, these are internal docs, almost in the same "demo"
state as when they were introduced, not important C code. They were
introduced 2.5 years ago, yet they still have a big "work in progress"
banner, a bunch of todo's inline, and links to 404's (also meant as
todo's) in it. Plus, the overall activity to improve was rather
moderate. The only actual activity was inrelease-process.md--
which is already Markdown, and not touched by my PRs at all.
None of this is wrong, but I don't think the docs have stalled because
the syntax is too hard. Rather, more time should be designated to them.
It's just hard in today's climate, e.g. LLM security reports have taken
over a large chunk of our time, and even before that issues and user
docs seem more pressing.
The auto-formatter was also removed in your PR (there might not be one
for MyST?), I think that's worth mentioning.
Ilija
None of this is wrong, but I don't think the docs have stalled because
the syntax is too hard. Rather, more time should be designated to them.
It's just hard in today's climate, e.g. LLM security reports have taken
over a large chunk of our time, and even before that issues and user
docs seem more pressing.The auto-formatter was also removed in your PR (there might not be one
for MyST?), I think that's worth mentioning.Ilija
I agree with Ilija. While my personal preference would be Markdown, I
don't see much benefit of rewriting/converting the docs to another
markup language. It's not hard to understand RST, nor I have a feeling
it's overcomplicated.
Besides the docs folder, RST is also currently used for UPGRADING,
UPGRADING.INTERNALS and NEWS. Changing these files to another format
will break things as they depend on that specific format (e.g
https://github.com/php/web-php/blob/master/bin/news2html internally, but
external sites parse these files as well).
So given that it does make sense that the docs are also written in the
same format for consistency. Not ignoring the fact that there are MD
files as well.
--
Regards,
Jordi Kroon
Hey Jordi,
thanks for the feedback!
Besides the docs folder, RST is also currently used for UPGRADING,
UPGRADING.INTERNALS and NEWS. Changing these files to another format
will break things as they depend on that specific format (e.g
https://github.com/php/web-php/blob/master/bin/news2html internally,
but external sites parse these files as well).
This is a non-argument because these documents are not and will not be
part of the book. Different context, different consumers. They will not
be touched, and are not relevant here. Bringing those up here is like
saying we cannot migrate the internals book to Markdown because doc-en
is XML.
So given that it does make sense that the docs are also written in the
same format for consistency. Not ignoring the fact that there are MD
files as well.
Also doesn't make sense because you ignore that we unavoidably will have
"churn" in one or the other direction to integrate docs-old that are
already Markdown. Although I'd really love to be one, I am unfortunately
not a magician -- hence, I cannot make the impossible 'smallest diff
with no "churn' at all' possible because we have source documents in
both formats.
Making it Markdown is more sensible; you even say you prefer it yourself.
Cheers
Nick
Hey Ilija,
thank you too for the feedback!
Hi Nick
Thanks for bringing this up on the list.
Just to state my thoughts officially:
Why Markdown:
- not yet another syntax to deal with; we all write Markdown
reST is pretty popular, so not exactly something esoteric. Sure, I
would also guess that Markdown is more known, but reST is very hard to
"learn" either.- renderable by default everywhere; including GitHub and IDEs
I don't think this holds.
Before:
https://github.com/php/php-src/blob/master/docs/source/core/data-structures/reference-counting.rstThe problem here being that this isn't pure reST or Markdown, but
MyST. I'd guess the same goes for IDEs. Switching the names to .md
might look better for a good chunk of the file, but then the reST-like
parts won't render well anymore.
That's only because you picked a commit from a non-final state that
solely exists to keep diffs small; mind the still existing .rst
extension. I would really appreciate if you could please at least once
look at the final PR instead of bit by bit arguing about non-final state.
Here is the real picture...
Before:
https://github.com/php/php-src/blob/master/docs/source/index.rst
After:
https://github.com/NickSdot/php__php-src/blob/docs/restructure-08/docs/source/index.md
Before:
https://github.com/php/php-src/blob/master/docs/source/core/data-structures/reference-counting.rst
After:
https://github.com/NickSdot/php__php-src/blob/docs/restructure-08/docs/source/core/memory-management/reference-counting.md
The only thing that cannot render perfectly are the non-standard tables
you asked for. Yet their contents are still very readable (in fact the
raw format you prefer in code) and still stand out (same as TOC; same in
reST/Markdown), reST renders eg important warnings/notes as plain text,
which is stupid That the Markdown syntax is much less noisy is proven by
the diff. Also, let me quote yourself from an internals message:
That said, reStructuredText is far from perfect itself.
So if you now gonna argue that:
- rendering tables is more important than rendering important (!)
warnings/notes that by definition should be highlighted - using the syntax all of use daily is not better in general
- suddenly reST which you called "far from perfect" has to be defended
at all cost
I will gonna fall off my chair for real.
Could you please address:
- why the demo state of the docs would justify being so picky
- why this is a blocker at all if we will have unavoidable "churn" one
or the other way because ofdocs-old - my point that much of this anyway will be touched/replaced in the
process of getting things updated
You are literally making any progress impossible by requiring no "churn".
Please allow me this... If we actually want to move things forward,
it would be nice if we would not over-complicate and over-think
everything. Otherwise, things just stagnate and (almost) nothing
happens as we see with this started but never finished initiative.
I don't think "let's not overcomplicate" should be an argument for
"let's not question changes". Asking for good reasons for the
switching from one stack to another seems reasonable.
As mentioned above, I'd really appreciate if you would get the full
picture, as in look at least once at the final PR, before questioning
bit by bit based on non-final state picks. I'd also appreciate if you
would not leave the good reasons I added unaddressed/ignored.
So to boil it down, these are internal docs, almost in the same
"demo" state as when they were introduced, not important C code. They
were introduced 2.5 years ago, yet they still have a big "work in
progress" banner, a bunch of todo's inline, and links to 404's (also
meant as todo's) in it. Plus, the overall activity to improve was
rather moderate. The only actual activity was inrelease-process.md
-- which is already Markdown, and not touched by my PRs at all.None of this is wrong, but I don't think the docs have stalled because
the syntax is too hard. Rather, more time should be designated to
them. It's just hard in today's climate, e.g. LLM security reports
have taken over a large chunk of our time, and even before that issues
and user docs seem more pressing.
As I mentioned, understandable that y'all are busy with other things.
That's why I am offering to help out. :)
The auto-formatter was also removed in your PR (there might not be one
for MyST?), I think that's worth mentioning.
Nah, that's not really dropped. It's re-activated in a later branch.
Reason for deactivating temporarily was your smaller diff requirement
for the first PR. I didn't open the last branch PR yet because it is WIP
to handle feedback
(https://github.com/php/php-src/commit/0d4035b98bfd5e5d97c5b515cf6630d685b34545)
without requiring me to rewrite all commits in all branches each time.
And, it is literally mentioned in the very diff you saw the removal in.
Ilija
Cheers
Nick
Why Markdown:
- not yet another syntax to deal with; we all write Markdown
reST is pretty popular, so not exactly something esoteric. Sure, I
would also guess that Markdown is more known, but reST is very hard
to "learn" either.- renderable by default everywhere; including GitHub and IDEs
I don't think this holds.
Before:
https://github.com/php/php-src/blob/master/docs/source/core/data-structures/reference-counting.rstThe problem here being that this isn't pure reST or Markdown, but
MyST. I'd guess the same goes for IDEs. Switching the names to .md
might look better for a good chunk of the file, but then the
reST-like parts won't render well anymore.That's only because you picked a commit from a non-final state that
solely exists to keep diffs small; mind the still existing.rst
extension. I would really appreciate if you could please at least once
look at the final PR instead of bit by bit arguing about non-final state.
To be fair, you created 8 PRs and pinged me only in the first one. So
naturally that's what I look at and judge. But as I already said in my
response, switching the file name to .md will fix some formatting issues
while creating others. You'll need a custom MyST plugin to fix it.
That's fine, but I'd like to remind you that your original argument was
that reST is somehow not well supported by GitHub or IDEs, which is just
incorrect.
I won't respond to the rest of your e-mail, as it reads like a rant and
personal attack.
Ilija
Hey Ilija,
That's only because you picked a commit from a non-final state that
solely exists to keep diffs small; mind the still existing.rst
extension. I would really appreciate if you could please at least
once look at the final PR instead of bit by bit arguing about
non-final state.To be fair, you created 8 PRs and pinged me only in the first one. So
naturally that's what I look at and judge. But as I already said in my
response, switching the file name to .md will fix some formatting
issues while creating others. You'll need a custom MyST plugin to fix
it. That's fine, but I'd like to remind you that your original
argument was that reST is somehow not well supported by GitHub or
IDEs, which is just incorrect.
The first PR explains everything for the full series in its description.
What for do we need a custom MyST plugin? What is to fix? And what
formatting issues? I cannot address if I don't know what this is about.
Could you please be more specific?
My original argument are the 5 points in the PR description of the first
PR, not the single one you are mentioning now. And they were all
correct; that now tables are not rendered is because you asked for the
non-Markdown ones. Wo that's the trade off.
I won't respond to the rest of your e-mail, as it reads like a rant
and personal attack.
Nothing of what I wrote was a rant, nor meant personal? I calmly and
rationally answered your email. I was simply pointing out that you
apparently not looked at the whole thing, which you now confirmed. My
point is that it is not productive to talk about in between steps
because it leads to wrong assumptions. For me as a non-native speaker my
mail reads polite. So not at all sure what you mean, but sorry anyway if
it came over different than I meant it.
I'd appreciate if you could re-consider to answer, because I think it
had important bits; and as clarified above nothing of this was meant as
a rant or personal.
Ilija
Cheers
Nick