Skip to content

broken links #408

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

Closed
budziq opened this issue May 8, 2018 · 6 comments
Closed

broken links #408

budziq opened this issue May 8, 2018 · 6 comments
Labels
Milestone

Comments

@budziq
Copy link
Collaborator

budziq commented May 8, 2018

There are currently at ~32 broken links in the cookbook. Tested with ruby html-proofer script.

This means that either:

  • the descriptions have wrong links
  • are outdated leading to outdated API's
  • some crates docs have been broken (most likely rand in this case)
gem install html-proofer && htmlproofer --empty-alt-ignore ./book/ 
- ./book/basics.html
  *  External link https://doc.rust-lang.org/rand/rand/distributions/index.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/distributions/normal/struct.Normal.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/distributions/range/struct.Range.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/distributions/trait.IndependentSample.html#tymethod.ind_sample failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/fn.thread_rng.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rand.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rng.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rng.html#method.gen_range failed: 404 No error
  *  External link https://doc.rust-lang.org/regex/regex/struct.Regex.html failed: 404 No error
  *  External link https://doc.rust-lang.org/regex/regex/struct.Regex.html#method.captures_iter failed: 404 No error
  *  External link https://doc.rust-lang.org/regex/regex/struct.RegexSet.html failed: 404 No error
  *  External link https://doc.rust-lang.org/regex/regex/struct.RegexSetBuilder.html failed: 404 No error
  *  External link https://docs.rs/rand/ failed: 404 No error
  *  External link https://docs.rs/rand/*/rand/trait.Rng.html#method.choose failed: 404 No error
  *  External link https://docs.rs/rand/*/rand/trait.Rng.html#method.gen_ascii_chars failed: 404 No error
- ./book/encoding.html
  *  External link https://docs.rs/url/*/url/percent_encoding/fn.percent_decode.html failed: 404 No error
  *  External link https://docs.rs/url/*/url/percent_encoding/fn.utf8_percent_encode.html failed: 404 No error
- ./book/logging.html
  *  External link https://doc.rust-lang.org/log/env_logger/#enabling-logging failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/enum.Target.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/fn.init.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/struct.Builder.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/struct.Builder.html#method.target failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/struct.LogBuilder.html#method.format failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/struct.LogBuilder.html#method.init failed: 404 No error
  *  External link https://doc.rust-lang.org/log/env_logger/struct.LogBuilder.html#method.parse failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/enum.LogLevel.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/enum.LogLevelFilter.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/fn.set_logger.html failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/struct.LogRecord.html#method.args failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/struct.LogRecord.html#method.level failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/trait.Log.html failed: 404 No error
- ./book/print.html
  *  External link https://docs.rs/reqwest/*/reqwest/header/struct.ContentRange.htm failed: 404 No error
htmlproofer 3.8.0 | Error:  HTML-Proofer found 32 failures!
@AndyGauge
Copy link
Collaborator

Should we rethink using wildcard crate versions in links? Locking them down to the version we are using would fix some of the links.

@budziq
Copy link
Collaborator Author

budziq commented May 8, 2018

locking to speciffic version will signifficantlybincrease maintenance burden at the cost of more broken links.

onbone hand it is an indicator that example is in a sense out of date but
on the other hand we already show rlthe latest badge advertizing support for rand 0.5.0.pre.1.
the real question is should we always track latest released version of given crate (I can't really say I'm loving such approach).

Hmm with some changes to how the links and badges are generated we could lock these to cargo.lock of skeptic tests

@dominikWin
Copy link
Contributor

After #411 there are two groups of broken links:

- ./book/basics.html     
  *  External link https://doc.rust-lang.org/rand/rand/distributions/index.html failed: 404 No error 
  *  External link https://doc.rust-lang.org/rand/rand/distributions/normal/struct.Normal.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/distributions/range/struct.Range.html failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/distributions/trait.IndependentSample.html#tymethod.ind_sample failed: 404 No error
  *  External link https://doc.rust-lang.org/rand/rand/fn.thread_rng.html failed: 404 No error       
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rand.html failed: 404 No error          
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rng.html failed: 404 No error           
  *  External link https://doc.rust-lang.org/rand/rand/trait.Rng.html#method.gen_range failed: 404 No error
  *  External link https://docs.rs/rand/*/rand/trait.Rng.html#method.choose failed: 404 No error     
  *  External link https://docs.rs/rand/*/rand/trait.Rng.html#method.gen_ascii_chars failed: 404 No error
  *  External link https://docs.rs/ring/*/ring/digest/struct.Context.html failed: 404 No error       
  *  External link https://docs.rs/ring/*/ring/digest/struct.Digest.html failed: 404 No error        
  *  External link https://docs.rs/ring/*/ring/hmac/ failed: 404 No error                            
  *  External link https://docs.rs/ring/*/ring/hmac/struct.Signature.html failed: 404 No error       
  *  External link https://docs.rs/ring/*/ring/pbkdf2/fn.derive.html failed: 404 No error            
  *  External link https://docs.rs/ring/*/ring/pbkdf2/fn.verify.html failed: 404 No error            
  *  External link https://docs.rs/ring/*/ring/pbkdf2/index.html failed: 404 No error                
  *  External link https://docs.rs/ring/*/ring/rand/trait.SecureRandom.html#tymethod.fill failed: 404 No error
- ./book/concurrency.html                         
  *  External link https://docs.rs/rand/ failed: 404 No error                                        
  *  External link https://docs.rs/ring/ failed: 404 No error                                        
- ./book/logging.html    
  *  External link https://doc.rust-lang.org/log/log/enum.LogLevel.html failed: 404 No error         
  *  External link https://doc.rust-lang.org/log/log/enum.LogLevelFilter.html failed: 404 No error   
  *  External link https://doc.rust-lang.org/log/log/fn.set_logger.html failed: 404 No error         
  *  External link https://doc.rust-lang.org/log/log/struct.LogRecord.html#method.args failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/struct.LogRecord.html#method.level failed: 404 No error
  *  External link https://doc.rust-lang.org/log/log/trait.Log.html failed: 404 No error             
  *  External link https://docs.rs/env_logger/*/env_logger/enum.Target.html failed: 404 No error     
  *  External link https://docs.rs/env_logger/*/env_logger/struct.LogBuilder.html#method.format failed: 404 No error
  *  External link https://docs.rs/env_logger/*/env_logger/struct.LogBuilder.html#method.init failed: 404 No error
  *  External link https://docs.rs/env_logger/*/env_logger/struct.LogBuilder.html#method.parse failed: 404 No error
htmlproofer 3.8.0 | Error:  HTML-Proofer found 30 failures!

ring has its documentation hosted at https://briansmith.org/rustdoc/ring/ (from Cargo.toml/crates.io). Updating to this removes 8 bad links. Should we link to a non-docs.rs location?

@budziq
Copy link
Collaborator Author

budziq commented May 13, 2018

Thanks for looking into it @dominikWin!

ring has its documentation hosted at https://briansmith.org/rustdoc/ring/ (from Cargo.toml/crates.io). Updating to this removes 8 bad links. Should we link to a non-docs.rs location?

While I'd preffer to have only docs.rs links for easier maintenability it is reasonable to follow crate authors wishes about where is their cannonical docs location (as pointed by cargo.toml). So I'd suggest to link to docs pointed by cargo.toml by default and use docs.rs as fallback.

@budziq
Copy link
Collaborator Author

budziq commented May 14, 2018

after #412 and #413 we are down to 8 broken links from rand

@budziq budziq changed the title 32x broken links broken links May 15, 2018
@budziq budziq added this to the CookBook 1.0 milestone May 16, 2018
@budziq budziq mentioned this issue May 16, 2018
11 tasks
@dominikWin
Copy link
Contributor

The docs for rand came back online. #417 fixes the links to them.
After this there is only one broken link:

- ./book/basics.html
  *  External link https://doc.rust-lang.org/rand/*/rand/distributions/range/struct.Range.html failed: 404 No error
htmlproofer 3.8.0 | Error:  HTML-Proofer found 1 failure!

This is caused by removing Range and replacing it with Uniform distribution in 0.5. When rand 0.5 stable comes out the recipe will need to be updated along with the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants