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 upHoedown big comeback! #41290
Conversation
QuietMisdreavus
reviewed
Apr 13, 2017
|
Should this get a crater/cargobomb run, to make sure we caught all the "bad tests" that are getting run in the pulldown era? Also, Travis choked when it tried to run tidy on the hoedown source. |
| let _ = writeln!(&mut io::stderr(), | ||
| "WARNING: {} test will be run in the next rustdoc version. If it's \ | ||
| not supposed to, please update your documentation and make it \ | ||
| compliant to common mark specifications.", |
This comment has been minimized.
This comment has been minimized.
QuietMisdreavus
Apr 13, 2017
Member
I may not have been present for the discussion, but this leaves a question: What's the timeline for this changeover now? Are we expecting this to follow some kind of stabilization FCP process to turn the commonmark tests back on?
There's also the matter of how loud this might need to be. I wonder how many people manually run the test suites on their projects, or just leave it to CI. If CI reports success even though these warnings come out, how much progress have we made?
This comment has been minimized.
This comment has been minimized.
GuillaumeGomez
Apr 14, 2017
Author
Member
@steveklabnik said "a few releases". And the point is to prevent to avoid current massive breakage. After that, we remove the warning and the tests will fail.
This comment has been minimized.
This comment has been minimized.
QuietMisdreavus
Apr 14, 2017
Member
If that's the case, and we're leaving this on long enough, then I think it'll be fine, as long as we raise a big enough clamor about it one way or another. We may want the warning text to say something like "a later rustdoc version", though, since it's not technically the "next" one.
| } | ||
| } | ||
|
|
||
| pub fn old_find_testable_code(doc: &str, tests: &mut ::test::Collector, position: Span) { |
This comment has been minimized.
This comment has been minimized.
QuietMisdreavus
Apr 13, 2017
Member
I take it this is very similar to the previous hoedown "find testable code" function, just updated to spit them into old_tests instead?
This comment has been minimized.
This comment has been minimized.
Mark-Simulacrum
added
the
S-waiting-on-author
label
Apr 14, 2017
This comment has been minimized.
This comment has been minimized.
|
Tidy fixed. |
GuillaumeGomez
force-pushed the
GuillaumeGomez:put-back-hoedown
branch
from
068a8ab
to
eb62d4d
Apr 14, 2017
This comment has been minimized.
This comment has been minimized.
This would be great, but @brson can't even complete the regular cargobomb run until next week. At that point, we already have a release going. So, I'm not sure :( (I couldn't get cargobomb working personally) |
This comment has been minimized.
This comment has been minimized.
|
There was a PR for |
steveklabnik
reviewed
Apr 14, 2017
| [submodule "src/rt/hoedown"] | ||
| path = src/rt/hoedown | ||
| url = https://github.com/rust-lang/hoedown.git | ||
| branch = rust-2015-09-21-do-not-delete |
This comment has been minimized.
This comment has been minimized.
steveklabnik
Apr 14, 2017
Member
review note: this is the same branch as was here previously. leaving a comment for myself so I don't forget that I checked!
This comment has been minimized.
This comment has been minimized.
|
This overall looks good to me. Two things:
I think I would write
Or something along those lines. I really wish we had a way to provide more and better information for people to help ease the transition, idk. @rust-lang/compiler you have some experience with this kind of thing, any suggestions? |
This comment has been minimized.
This comment has been minimized.
|
I don't understand; what's the point of this PR? didn't we replace hoedown with pulldown-cmark? |
This comment has been minimized.
This comment has been minimized.
|
The issue is, the change caused many things that weren't tested as rust code before to be tested now, and those tests failed. Take this:
with When we announced the change, nobody really commented, or rather, we had four or five crates that needed updating to fix this. But a cargobomb run identified a lot of crates, way more than we are willing to regress on, that ended up failing their test suites because of this kind of thing. So we need to spread this out over a longer period of time than just one release. Does that make sense? |
This comment has been minimized.
This comment has been minimized.
|
yes, completely! I didn't even know this was a problem. yikes |
This comment has been minimized.
This comment has been minimized.
|
Update: I don't think the flag is needed, as once your stuff runs without any warnings, you're good. So maybe focus the error message on that?
|
GuillaumeGomez
added some commits
Apr 13, 2017
GuillaumeGomez
force-pushed the
GuillaumeGomez:put-back-hoedown
branch
from
f47f1ee
to
bee0291
Apr 17, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ thanks! |
This comment has been minimized.
This comment has been minimized.
|
|
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Apr 17, 2017
bors
added a commit
that referenced
this pull request
Apr 17, 2017
bors
merged commit bee0291
into
rust-lang:master
Apr 17, 2017
1 check passed
This comment has been minimized.
This comment has been minimized.
|
My personal hope was that we would bring hoedown back in full as part of this, not just for finding testable code. I realize that the only visible regressions are those related to doctests but are there not a large number of rendering regressions as well? Both related to changing to CommonMark but also bugs in the implementation? My assumption would be that the new pulldown-cmark implementation would be behind a flag by default. We would print warnings indicating breakage on doctests immediately and otherwise strongly encourage authors to test their documentation rendering (via something like I fear that this PR currently only fixes cargobomb, and still leaves the door open to a lot of breakage wrt rendering. |
GuillaumeGomez
deleted the
GuillaumeGomez:put-back-hoedown
branch
Apr 18, 2017
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton: If we start putting this change behind a flag, no one will use it and the time of adoption will only grow. I was against putting back hoedown (even for this case) and more in favor for a hard break. |
This comment has been minimized.
This comment has been minimized.
|
@GuillaumeGomez there is some truth to that -- I agree that most people will not opt in, even if we advertise the change widely. Nonetheless, the "best case" procedure is to go through several stages:
Very often, this requires keeping two copies of the code around (one that does the old thing, one that does the new thing), and then diffing the results. In some cases, it's just not possible to get precise warnings -- in that case, we typically try very hard to do warnings where we can. In very few cases, we skip the early stages because there doesn't seem to be much effect in practice. It is true that people often ignore the warnings. But doing it in several stages has the advantage that we at least give people a chance to respond, which means that when the breakage finally comes, it is less frustrating (you know it was coming, after all, or at least you can see that we made an effort to let you know). In short, breaking changes always disturb people, and the best thing is to disturb them as little as we can (btw, if we can come up with ways to do this better and/or with less effort, I'm all ears! Avoiding breakage is a constant struggle.) The other advantage of warnings is that we can sometimes detect them automatically, of course, and hence we can offer up PRs or at least ping people to bring their attention to the fact that warnings will be transitioning into harder errors. |
This comment has been minimized.
This comment has been minimized.
|
(An example of this procedure is the forwards compatibility lints, which start out as warnings, proceed to deny-by-default, and then make a hard error.) |
GuillaumeGomez commentedApr 13, 2017
r? @rust-lang/docs