Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue (Rustdoc): hoedown -> pulldown migration #44229
Comments
nrc
added
T-rustdoc
T-dev-tools
T-doc
labels
Aug 31, 2017
This comment has been minimized.
This comment has been minimized.
QuietMisdreavus
added
the
C-tracking-issue
label
Aug 31, 2017
This comment has been minimized.
This comment has been minimized.
What is happening?We're changing the way that Rustdoc renders markdown in your docs. We're moving to use a new parser and renderer (Pulldown) which is standards compliant (CommonMark), more robust, less buggy, and written in Rust. You can use Pulldown on nightly rustdoc by using the However, there are some changes to how your docs might be rendered. The known issues are:
We are currently providing warnings (when running Rustdoc) if the documentation for your crate will change with the new renderer. You should check these warnings to ensure that your documentation still renders correctly. |
bors
added a commit
that referenced
this issue
Sep 1, 2017
bors
added a commit
that referenced
this issue
Sep 1, 2017
This comment has been minimized.
This comment has been minimized.
|
Update: #44238 and #44329 addressed some issues with the warnings and it is now off by default (it was on by default for one nightly release). The next step is to assess the false positive situation. @QuietMisdreavus is going to list some good test crates and obtain the warning output for them. @GuillaumeGomez is going to try some experiments to reduce the false positive rate. |
This comment has been minimized.
This comment has been minimized.
|
ping @QuietMisdreavus did you get a chance to look at good test crates? |
This comment has been minimized.
This comment has been minimized.
|
After getting the first false positive i didn't dig much farther. However, a quick check of a handful of popular crates shows some more leads:
Something similar happens in
I'll add more samples over time. |
This comment has been minimized.
This comment has been minimized.
|
The results for
|
This comment has been minimized.
This comment has been minimized.
|
On a farther read, the EDIT: gonna add farther notes to this comment rather than spamming the thread.
EDIT 2: EDIT 3: EDIT 4:
Here, the entire docstring is a single asterisk. Hoedown leaves it alone, puts it into the output as-is. Pulldown creates a new unordered list with an single, empty item. |
This comment has been minimized.
This comment has been minimized.
|
In sum, rocket continues to deliver as the quintessential rustdoc stress test. There are a few new rendering differences in here, a couple of which are technically bugs in pulldown.
|
This comment has been minimized.
This comment has been minimized.
|
I did all of this testing using the approved-but-not-yet-merged #44368. Judging from how all of these turned out, i'm willing to say that as soon as that lands, all the rendering warnings left will be true rendering differences. It doesn't mean that Pulldown is perfect, just that we're accurately talking about what it's doing. |
This comment has been minimized.
This comment has been minimized.
|
Next step here is that @GuillaumeGomez will draft a blog post about how to address the changes required for crate authors. We'll advertise that as widely as possible and then (depending on fallout) change the warnings to on by default a few weeks later. |
This was referenced Sep 28, 2017
QuietMisdreavus
referenced this issue
Oct 16, 2017
Merged
Print rustdoc rendering warnings all the time #45324
mbrubeck
added a commit
to mbrubeck/rust-siphash
that referenced
this issue
Oct 17, 2017
mbrubeck
referenced this issue
Oct 17, 2017
Merged
Make links in documentation work with commonmark #4
mbrubeck
added a commit
to mbrubeck/app_units
that referenced
this issue
Oct 17, 2017
This was referenced Oct 17, 2017
mbrubeck
added a commit
to mbrubeck/image
that referenced
this issue
Oct 17, 2017
mbrubeck
referenced this issue
Oct 17, 2017
Merged
Fix documentation formatting with commonmark enabled #340
mbrubeck
added a commit
to mbrubeck/num
that referenced
this issue
Oct 17, 2017
bors-servo
added a commit
to servo/euclid
that referenced
this issue
Dec 14, 2017
Manishearth
referenced this issue
Dec 28, 2017
Merged
Implement RFC 1946 - intra-rustdoc links #47046
This comment has been minimized.
This comment has been minimized.
|
Are we still waiting on something to flip the switch? #47046 would be slightly easier if we didn't have to support both. Slightly, not very, so don't rush on its account. |
This comment has been minimized.
This comment has been minimized.
|
It hasn't hit stable yet; we wanted to do that before we started making more moves. |
MaloJaffre
added a commit
to MaloJaffre/parking_lot
that referenced
this issue
Dec 29, 2017
MaloJaffre
referenced this issue
Dec 29, 2017
Merged
Fix future compatibilty warnings and bump version #53
QuietMisdreavus
referenced this issue
Jan 12, 2018
Merged
Switch to pulldown as default markdown renderer #47398
This comment has been minimized.
This comment has been minimized.
|
With the release of 1.23.0 last week, the warnings-by-default have hit stable! Since we haven't heard much by way of people reacting to it, we're moving on with the next step: rendering with Pulldown by default, with an option to go back to Hoedown. This is being done in #47398. |
This comment has been minimized.
This comment has been minimized.
|
I checked the checkbox (to avoid someone doing a duplicate). |
This comment has been minimized.
This comment has been minimized.
|
Sorry if this isn't the right place to ask. I'm trying to figure out how to migrate turtle's documentation to the new renderer. There are lots of warnings but I'm not really clear on how to fix anything. Is there a way for me to see the actual output differences? There are some weird things going on where rustdoc seems to be rendering
Also, smaller issue, the warnings for certain dependencies still seem to be outputted even with |
This comment has been minimized.
This comment has been minimized.
|
There's no interactive difference view, but you can render the docs with the different renderers to see the differences. With a nightly, run once with |
This comment has been minimized.
This comment has been minimized.
|
How massive a lift would it be to add a difference view? (Trying to get a feel for effort level vs. value.)
|
This comment has been minimized.
This comment has been minimized.
That is exactly what I was looking for. Thanks! Though an integrated diff view would certainly be nice too, being able to manually do it myself is good enough for me. It turns out that the In case it helps anyone else, here's what I did to find the differences between the renderers: $ # Start clean by removing any previously generated docs
$ rm -rf target/doc*
$ # Generate docs with the old renderer
$ cargo +nightly doc --no-deps
$ mv target/doc target/doc-hoedown
$ # Generate docs with the new renderer
$ cargo +nightly rustdoc -- -Z unstable-options --enable-commonmark
$ # There are now two folders: `target/doc-hoedown` (old renderer) and `target/doc` (new renderer)
$ diff -r target/doc-hoedown/turtle target/doc/turtleNote that turtle is the name of my crate, so anyone else using these instructions should replace |
This comment has been minimized.
This comment has been minimized.
|
@chriskrycho too much, as we're planning on phasing the whole thing out very soon. Very few people at this point have commented so far, so it seems that the majority of issues have already been taken care of. Lots of work for little reward. |
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik |
sunfishcode
added a commit
to sunfishcode/wasmparser.rs
that referenced
this issue
Jan 16, 2018
sunfishcode
referenced this issue
Jan 16, 2018
Merged
Fix markdown syntax to be compatible with the pulldown parser. #44
niluxv
added a commit
to niluxv/rust-crypto
that referenced
this issue
Feb 3, 2018
This comment has been minimized.
This comment has been minimized.
Michael-F-Bryan
commented
Feb 4, 2018
|
I just noticed that tables aren't being rendered with the new pulldown renderer. I believe it's a trivial fix though (see raphlinus/pulldown-cmark#104). For Example: /// Deserialize a raw CAN packet, validating its fields.
///
/// # Format
///
/// When deserializing the raw packet's payload, we expect it to be laid out
/// using the following
///
/// | Offset | Name | Description |
/// |----------+--------+----------------------------------|
/// | 0 | Bus ID | Which bus this packet came in on |
/// | 1 | CAN ID | The associated CAN ID |
/// | 3 | Length | The length of the data section |
/// | 4.. | Data | The packet's payload |
pub fn parse(data: &[u8]) -> Result<(CanPacket, usize), Error> {
...
}When you viewed using And on nightly: |
This comment has been minimized.
This comment has been minimized.
|
We do enable tables in the Pulldown parser. Your row separating the header from the data isn't what it's expecting, though. See https://github.com/webuni/commonmark-table-extension for the syntax - it wants you to use |
This comment has been minimized.
This comment has been minimized.
Ogeon
commented
Feb 17, 2018
|
It seems like comments on trait methods get unescaped when they are shown as implemented traits. Something like |
This comment has been minimized.
This comment has been minimized.
|
@Ogeon: Please open a new issue for this. |
This comment has been minimized.
This comment has been minimized.
|
This #48274 got merged, the C cursed has now definitely been removed. Let's all celebrate by closing this issue! \o/ |
GuillaumeGomez
closed this
Feb 18, 2018
This comment has been minimized.
This comment has been minimized.
Ogeon
commented
Feb 18, 2018
|
@GuillaumeGomez Alright, submitted #48332. |


nrc commentedAug 31, 2017
•
edited by GuillaumeGomez
If you've arrived via a warning and what to know what is going on, see this comment.
html-diffdependency, etc (#48274)Blocking warning cycle