Make ddox the default doc for dlang.org menu#1526
Make ddox the default doc for dlang.org menu#1526wilzbach wants to merge 1 commit intodlang:masterfrom
Conversation
|
@wilzbach are examples runnable just the same in both? any dead links? anything to worry about? In the past I ran quickly into some issue. |
|
e.g. https://dlang.org/library-prerelease/ has a few oddities:
|
|
I also don't see any runnable test. Do we need to do some deployment? @CyberShadow is ddox part of the auto-deployment engine? |
I haven't found time to work on this yet. It's a different setup.
Well there are different two setups (since two years) :/
Ddoc will stay for quite a while.
Yep I just started the discussion to figure out the last blocking points... |
Yes. Runnable tests are just not implemented for DDox right now. |
|
So what is the decision here?
|
|
Copying from my older comments: "...e.g. https://dlang.org/library-prerelease/ has a few oddities: ..."
Not fixed.
Not fixed.
Not fixed.
Not fixed.
Not fixed. |
|
I'd say let disqus be. Doesn't hurt and the dearth of comments is not a reflection on disqus as much as a lack of critical mass in viewership. |
|
On Wed, Feb 22, 2017 at 09:34:44AM -0800, Andrei Alexandrescu wrote:
* Those `std.experimental.allocator.building_blocks.*` don't have any description
That's not ddox's fault, the source for those submodules is missing documentation on the module declaration. We should do a Phobos PR to
add some description text to those modules.
* Description for some modules comes in heading font, e.g. "Assembling Your Own Allocator"
dpldocs.info stripped the header tags there, but it is arguably also the source module's fault - it should have a brief summary before the headers and details.
* The table "Access to plattform libraries is supported by specific D header files" is odd because it has a bunch under C99 and nothing everywhere else
Again, those aren't documented in the source. We should do a druntime PR to add doc comments there. Or something. I'm not sure it makes sense to do too much ddoc of C declarations, but it is a FAQ "why isn't this documented on dlang.org?" so we should do SOMETHING.
So bottom line, let's do PRs on phobos and druntime to document these, and ddox should automatically pick up the benefit - and ddoc might too.
|
Correct, those should ideally predate switching to ddox. |
There was a problem hiding this comment.
I have to say, the dlang.org/library/ docs are a major regression in terms of scanability and readability. The default should not be changed until the following issues are fixed.
- The index page for /library/ sucks compared to /phobos/. Way less info and less organized.
- The package pages std.algorithm, std.range, and std.experimental.allocator are not linked
anywhere but the side-bar under "Package Members". These need to be the default when clicking on std.algorithm on the side bar and linked on the index page. These pages give an essential overview of the whole module to new comers. - Function/template name column is way too narrow, everything is squished.
- The way the new docs split the various module items by function/enum/structs/etc is a step backwards in readability, because now things like aliases for specific functions, e.g.
std.algorithm.comparison.AllocateGCare no longer shown next to the function it's used for. There are many other examples of this.
Now, we get to the non-objective things. Feel free to disagree here, but I hope to provide a compelling case.
- The /library/ docs lack in information density. Compare https://dlang.org/phobos/std_algorithm_comparison.html#.among
to https://dlang.org/library/std/algorithm/comparison/among.html. The new docs take up twice the space of the old ones. One reason for this is the absurd amount of space given to the function signatures. Also, why does /library/ repeat the docs for the function and the template ofamong? - Things get repeated when they weren't before. Before, the template signiture for
amongwas listed with the function overload. Now, in the module overview it's repeated in the templates section, but they both link to the same place. Does this add any extra value? - I see very little value in giving every function its own page. Perhaps the argument could be made for structs and classes in order to encapsulate complex types. But I often go back and scan the entire std.range page because I know there's a function to do something, I just forgot the name of it. In this case, I would have to guess from the little information the auto generated module page gives, or click on each one individually.
I'll comment on more things as I think of them
It helps so, so, so much on search results, and having plenty of space means it is possible to format the information better (ddox does meh on it but still). Consider that so many search engine hits go to ddox already, it just highlights how much easier they are to link to. |
|
This goes on to confirm what I like to joke about: whatever we do, someone will be against it. Page-per-artifact has been vociferously asked for by many folks. Growing pains! My approach in this: we can afford to offer both with ease, so we should. (We're not alone; see e.g. https://www.gnu.org/software/make/manual/ which offers several ways to view the same documentation.) |
|
As long as |
|
https://dlang.org/library/std/range/drop.html shows raw HTML |
|
The source looks off: https://github.com/dlang/phobos/blob/v2.074.1/std/range/package.d#L2880 |
|
Thanks. dlang/phobos#5494 |
|
@s-ludwig Would it be possible to make DDox throw a hard error upon encountering such invalid syntax? |
|
@CyberShadow I'll remember to add that (dlang/ddox#154). I'd suggest to make this an opt-in switch, though, because it could break existing projects otherwise. |
|
Cheers. I guess we could grep the output in the makefile as well. |
|
I don't see any relevant warnings in |
|
Indeed.. it currently silently uses the end of the paragraph to mark the end of the back tick code in this case. |
|
On Sun, Jun 18, 2017 at 01:13:37AM -0700, Sönke Ludwig wrote:
Embedding DDOC within backticks is "strange" and the opening back tick has no closing match.
If it has no closing match on the line, the backtick is supposed to be output literally. The backtick code thing is not supposed to be able to span lines.
I did that quite deliberately in the implementation for dmd because 1) linker output often does something like identifier `foo' and I wanted that to be copy/pastable and 2) github ignores it with no match too.
See the explicit comment here:
https://github.com/dlang/dmd/blob/master/src/ddmd/doc.d#L2166
|
|
@adamdruppe: Fixed for DDOX 0.16.1: dlang/ddox#155 |
|
On Sun, Jun 18, 2017 at 09:16:21AM -0700, Sönke Ludwig wrote:
@adamdruppe: Fixed for DDOX 0.16.1: dlang/ddox#155
Excellent!
|
|
Some broken documentation (example) here: https://dlang.org/library/std/algorithm/searching/find_skip.html Looks OK on DDoc: https://dlang.org/phobos/std_algorithm_searching.html#findSkip |
|
This is an effect of the necessary workaround to extract the unit test code for the example. I've opened a ticket (dlang/ddox#156) and this should be solvable by employing dparse to tokenize the source code instead of blindly searching for the last closing brace. |
|
The prototype here is really broken: http://dlang.org/library-prerelease/std/file/dir_entries.html
On Chrome the justification will not be visible as we do not enable it for that browser (because it does not support automatic hyphenation). |
|
Only regular flowing text should be justified, nothing else (not even tables) btw. |
|
Yeah, I guess problems with justification slip through the cracks because it's disabled for Chrome (because of hyphenation), and many contributors test with it exclusively. |
|
https://issues.dlang.org/show_bug.cgi?id=17624 Because DDox simply repeats the documentation for |
|
That must be one of the parse errors from above. I'll try to remember the text justification issue. BTW, is there any known reason why this is not simply restricted to Any suggestion how we should handle this? To me it seems to be a rather unclean use of IMO, this one should be fixed by simply splitting up the sentence into two doc comments. |
How about listing members in declaration order, instead of alphabetical order? Then you can use |
That's a good idea that shifts the responsibility and freedom reasonably. |
|
It doesn't make that much sense to use declaration order once the declarations are grouped by kind, IMO. But I suggested to group declarations within the table already. The question is more how to proceed for the per-declaration page. |
I guess the obvious answer is to somehow indicate that the documentation applies to other members too (listing them in a dimmed font or "(also: foo, bar)" OSLT). Another approach would be to decide to use
BTW, I'm not really convinced that such grouping is useful. I know MSDN and many documentation generators do it, but... properties and paren-less function call syntax in general blur the line between fields and methods in D somewhat. Declaration order is likely to have things grouped together more consistently. |
|
There are commas missing in the description of the https://dlang.org/phobos/std_path.html#globMatch In DDox, for the "Matches either of the specified strings." table row, the first column reads "{string1string2…}" instead of "{string1,string2,…}". |
|
Disqus comments are identical for every function. https://dlang.org/library/std/typecons/proxy.html I would strongly argue for comments to be removed completely from documentation pages. I think comments have no place in documentation; we have the learn forum for asking questions (with excellent and timely response I might add) and the issue tracker for issues. I have yet to see a comment that is worth my time reading and in general comments just pollute the docs. If a quick way of asking questions is thought to be needed then the following alternative can be considered: buttons at the bottom of the page for
|
Let's try this one more time: #2124 |
|
I have to say, I agree with @JackStouffer that I personally prefer the current For example, the docs for std.algorithm.find contains 5 links at the top of the page, all named "function find", apparently 5 overloads, but the link text contains no information about which overload is which. This is followed by 5 blocks describing each of 5 overloads, but formatted in a way that upon looking at the first block, you wouldn't expect that it's just one of 5 blocks. Then within each overload, far too much space is wasted displaying the function signature is an unusual formatting (compile-time parameters on one line, whereas runtime parameters forced into one line per parameter even if the whole thing actually fits on one line), extraneous space in the sig constraints line, and no syntax highlighting beyond type names. Worse yet, the constraints are then repeated again under a It would have been much better if the function signature were more cleverly formatted, e.g., in a more visually-pleasing way, and in a way more closely resembling normal D style, such as: I.e.:
Overloads should be handled more deftly, by providing a more consistent way to navigate between overloads, or seeing an overview of all overloads that's more informative than "function find" repeated 5 times without any apparent difference between them. The current way of navigating between overloads in the Then there's the matter of larger-scale navigation. The current navigation is functional, but there's one big gap: some visual indication of where the current function sits within the current module. Without this visual cue, one feels pretty lost at where in the forest of docs we're at right now. At least in the one page per module
So overall, the |
|
I'm not fundamentally against one page per function. But it does need to be done better in order to be usable. |

Starting with step 1 as outlined here
CC @s-ludwig
However I would love to love see the Disqus problem sorted out before. So let me summarize the three main options proposed so far:
Option 1: self-hosted commenting
I share a similar opinion as @MartinNowak:
Option 2: use DFeed
(from @CyberShadow)
Option 3: remove Disqus
Note that removing Disqus has been attempted this summer, which was reverted as @MartinNowak wasn't available at this time.