Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mdbook. #66338

Merged
merged 2 commits into from
Nov 15, 2019
Merged

Update mdbook. #66338

merged 2 commits into from
Nov 15, 2019

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Nov 12, 2019

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues. More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 12, 2019
@ehuss
Copy link
Contributor Author

ehuss commented Nov 12, 2019

cc @mark-i-m @Michael-F-Bryan
I had to remove the timeout filter for mdbook-linkcheck, as the API doesn't seem to provide a way to do it anymore. Would it be possible to extend mdbook-linkcheck to make that a built-in feature?

Also, the API is a little awkward, needing to import a separate crate for the ColorChoice.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 12, 2019

📌 Commit 139477d has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2019
@Michael-F-Bryan
Copy link

Would it be possible to extend mdbook-linkcheck to make that a built-in feature?

You can actually remove the hack checking if "timed out" is in the error message because all necessary information is exposed in the invalid link error.

I'm not sure of the exact code you'd write (on phone), but the chain of items you're looking for are:

  1. ValidationOutcome::invalid_links
  2. InvalidLink::reason
  3. Reason::Client(reqwest::Error)
  4. reqwest::Error::is_timeout()

Also, the API is a little awkward, needing to import a separate crate for the ColorChoice.

Sorry about the awkward API! I'll see if I can make a new patch release which re-exports the enum so you can avoid adding the dependency to Cargo.toml and keep it in sync.

@ehuss
Copy link
Contributor Author

ehuss commented Nov 12, 2019

Sorry Alex, you're too fast. I forgot to check licenses, and needed to push an update.

@Michael-F-Bryan None of those are pub exposed APIs. Primarily check_links is not pub. It's also a bit unfortunate needing to duplicate all the logic in the run function.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 12, 2019

📌 Commit 32d1f47 has been approved by alexcrichton

@mark-i-m
Copy link
Member

@ehuss Do you know if it is possible to take advantage of mdbook-linkcheck caching now? That is we would store the link cache. If we do that, then I think we don't need to worry about timeouts as much because we will be making fewer requests to start with... Does Azure pipelines have a way to cache artifacts and restore them?

@ehuss
Copy link
Contributor Author

ehuss commented Nov 12, 2019

if it is possible to take advantage of mdbook-linkcheck caching now?

Azure has a beta preview of caching, but the rust repo does not use it. Typically s3 buckets are used, but I do not know anything about them or whether it would be appropriate to use.

@Michael-F-Bryan
Copy link

@Michael-F-Bryan None of those are pub exposed APIs. Primarily check_links is not pub.

Ah, I was looking at mdbook_linkcheck::validate(). I'm guessing it should be fine to make that pub seeing as it's the main way you'd want to programmatically use mdbook-linkcheck once a book has been loaded into memory.

@mark-i-m mark-i-m mentioned this pull request Nov 13, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Nov 14, 2019
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
tmandry added a commit to tmandry/rust that referenced this pull request Nov 14, 2019
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 15, 2019
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 15, 2019
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
bors added a commit that referenced this pull request Nov 15, 2019
Rollup of 12 pull requests

Successful merges:

 - #65557 (rename Error::iter_chain() and remove Error::iter_sources())
 - #66013 (Avoid hashing the key twice in `get_query()`.)
 - #66306 (Remove cannot mutate statics in initializer of another static error)
 - #66338 (Update mdbook.)
 - #66388 (Do not ICE on recovery from unmet associated type bound obligation)
 - #66390 (Fix ICE when trying to suggest `Type<>` instead of `Type()`)
 - #66391 (Do not ICE in `if` without `else` in `async fn`)
 - #66394 (Fix two OOM issues related to `ConstProp`)
 - #66398 (Remove some stack frames from `.async` calls)
 - #66410 (miri: helper methods for max values of machine's usize/isize)
 - #66418 (Link to tracking issue in HIR const-check error code description)
 - #66419 (Don't warn labels beginning with `_` on unused_labels lint)

Failed merges:

r? @ghost
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 15, 2019
Update mdbook.

This brings in some important updates to fix some rendering issues in the books. In particular fixing hidden lines in code blocks, and some escaping issues.  More details at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md

This also requires updating mdbook-linkcheck.
bors added a commit that referenced this pull request Nov 15, 2019
Rollup of 12 pull requests

Successful merges:

 - #65557 (rename Error::iter_chain() and remove Error::iter_sources())
 - #66013 (Avoid hashing the key twice in `get_query()`.)
 - #66306 (Remove cannot mutate statics in initializer of another static error)
 - #66338 (Update mdbook.)
 - #66388 (Do not ICE on recovery from unmet associated type bound obligation)
 - #66390 (Fix ICE when trying to suggest `Type<>` instead of `Type()`)
 - #66391 (Do not ICE in `if` without `else` in `async fn`)
 - #66398 (Remove some stack frames from `.async` calls)
 - #66410 (miri: helper methods for max values of machine's usize/isize)
 - #66418 (Link to tracking issue in HIR const-check error code description)
 - #66419 (Don't warn labels beginning with `_` on unused_labels lint)
 - #66428 (Cleanup unused function)

Failed merges:

r? @ghost
@bors bors merged commit 32d1f47 into rust-lang:master Nov 15, 2019
@ehuss ehuss mentioned this pull request Dec 2, 2019
bors added a commit that referenced this pull request Dec 2, 2019
[beta] Update mdbook

This is a backport of #66338. There were some significant rendering regressions, particularly in example code, in the version on the beta branch.

This change drops mdbook-linkcheck rather than updating it. The new version brought in a number of new crates and changes that I wasn't comfortable pulling into beta. The linkcheck is only used for the rustc-guide which is not published from this repo.

Detailed notes are at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants