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 book #47753

Merged
merged 4 commits into from
Feb 6, 2018
Merged

Update book #47753

merged 4 commits into from
Feb 6, 2018

Conversation

steveklabnik
Copy link
Member

This PR does two things:

  1. update the book to include Improve redirects book#1088
  2. update to mdbook 0.1

Both of these things are big changes, so I want to land them now, well before the next branch, so we can kick the tires.


Locally, I'm seeing some weirdness around the reference and this:

image

Putting this PR up so others can try and build and see if it reproduces for them.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

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

@alexcrichton
Copy link
Member

in terms of r+, r=me whenever this is good to go! I imagine though @rust-lang/docs may wish to help out with the investigation

@kennytm kennytm added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 25, 2018
@QuietMisdreavus
Copy link
Member

I can confirm the reference rendering strangely. There's an open PR on the reference that might help with this; should we merge that first and update it here?

@Michael-F-Bryan
Copy link

You'll probably want to make sure each document's book.toml is updated too. We changed the configuration file format around a bit, but there's a legacy shim which will try to detect when you're using the old format and use that, emitting a warning with instructions on how to update.

Let me know if there's anything we can do from mdbook's end!

@steveklabnik steveklabnik force-pushed the update-book branch 2 times, most recently from a9268e3 to 33b32f0 Compare January 26, 2018 17:33
@steveklabnik
Copy link
Member Author

This will fail until rust-lang/mdBook#585 is in an mdbook release.

@steveklabnik
Copy link
Member Author

this should be good to go now 🎊

@steveklabnik steveklabnik added the relnotes Marks issues that should be documented in the release notes of the next release. label Jan 27, 2018
@alexcrichton
Copy link
Member

Looks like Travis may be failing?

@steveklabnik
Copy link
Member Author

Hm. very odd.

[00:42:55] An error occured:
[00:42:55] Rendering failed

not super helpful...

@Michael-F-Bryan
Copy link

not super helpful...

Lol. We're using error-chain and chain_err() to give an error more context. If you print out the causes then it'll tell you what went wrong, we currently have a helper in mdbook for exactly this:

/// Prints a "backtrace" of some `Error`.
pub fn log_backtrace(e: &Error) {
    error!("Error: {}", e);

    for cause in e.iter().skip(1) {
        error!("\tCaused By: {}", cause);
    }
}

@steveklabnik
Copy link
Member Author

steveklabnik commented Jan 28, 2018

@Michael-F-Bryan yeah, sorry, I typed that in haste; this behavior is totally reasonable!

I've pushed a commit that uses this, let's see what it says (the build succeeds for me locally)

@steveklabnik steveklabnik force-pushed the update-book branch 2 times, most recently from 7fe8313 to dd32a11 Compare January 28, 2018 16:34
@steveklabnik
Copy link
Member Author

i was able to reproduce locally, and this is what I have:

Error: Rendering failed
        Caused By: Unable to copy across additional CSS and JS
        Caused By: Unable to copy theme/reference.css to C:\Users\steve\src\rs\build\x86_64-pc-windows-msvc\doc\reference\theme/reference.css
        Caused By: The system cannot find the path specified. (os error 3)

this make sense as to why it's only the reference that fails.

note that C:\Users\steve\src\rs\build\x86_64-pc-windows-msvc\doc\reference\theme/ does exist, this makes me think it's theme/reference.css that doesn't. but that does too: src\doc\reference\theme\reference.css is there.

i wonder if this is an mdbook bug, not respecting the path when passed in -d? that is, the error is just printing theme/reference.css, without the prefix and that makes me suspicious.

@steveklabnik
Copy link
Member Author

Yes, this is the answer, I believe. The reference has theme/reference.css in its config, which is then un-modified by mdbook, leading to it not respecting -d. working on an mdbook patch now

steveklabnik added a commit to rust-lang/mdBook that referenced this pull request Jan 28, 2018
Before, when someone like the Reference set their extra css as
"theme/reference.css" in their book.toml, this path would be treated as
relative to the invocation of mdbook, and not respect the input path. This
PR modifies these relative paths to do so.

Fixes the build of rust-lang/rust#47753 which
blocks updating rustc to mdbook 0.1
@steveklabnik
Copy link
Member Author

rust-lang/mdBook#598

@kennytm kennytm added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 28, 2018
@steveklabnik
Copy link
Member Author

confirmed the fix locally, but pushed a commit up here to check on the builders too

we'll need an mdbook release in order to ship this

@steveklabnik
Copy link
Member Author

well, uh looks like that's another bug: https://travis-ci.org/rust-lang/rust/builds/334450214#L2554

@steveklabnik
Copy link
Member Author

okay! I'm going to wait until the release ships, and then rebase this to be more reasonable.

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 2, 2018
@steveklabnik
Copy link
Member Author

Why is it invalid? In that we don't accept MPL based code? I was pretty sure we had some already... and it would be kinda weird to reject Mozilla's license, heh.

@kennytm
Copy link
Member

kennytm commented Feb 3, 2018

@steveklabnik it would be invalid if these packages were used by the standard library since it should be strictly MIT/Apache2. As these are only used for generating the book, you can add exceptions to tidy by editing https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/deps.rs

bors added a commit that referenced this pull request Feb 3, 2018
Rollup of 10 pull requests

- Successful merges: #46156, #47829, #47842, #47898, #47914, #47916, #47919, #47942, #47951, #47973
- Failed merges: #47753
@steveklabnik
Copy link
Member Author

new commit pushed, that look correct? :)

@kennytm
Copy link
Member

kennytm commented Feb 3, 2018

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 3, 2018

📌 Commit abb162c has been approved by alexcrichton

kennytm added a commit to kennytm/rust that referenced this pull request Feb 3, 2018
…chton

Update book

This PR does two things:

1. update the book to include rust-lang/book#1088
2. update to mdbook 0.1

Both of these things are big changes, so I want to land them now, well before the next branch, so we can kick the tires.

------------------------------

Locally, I'm seeing some weirdness around the reference and this:

![image](https://user-images.githubusercontent.com/27786/35411917-8dcbb31a-01e8-11e8-8c30-0bd280d93b9d.png)

Putting this PR up so others can try and build and see if it reproduces for them.
bors added a commit that referenced this pull request Feb 3, 2018
Rollup of 9 pull requests

- Successful merges: #47753, #47862, #47877, #47896, #47912, #47944, #47947, #47978, #47958
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request Feb 4, 2018
…chton

Update book

This PR does two things:

1. update the book to include rust-lang/book#1088
2. update to mdbook 0.1

Both of these things are big changes, so I want to land them now, well before the next branch, so we can kick the tires.

------------------------------

Locally, I'm seeing some weirdness around the reference and this:

![image](https://user-images.githubusercontent.com/27786/35411917-8dcbb31a-01e8-11e8-8c30-0bd280d93b9d.png)

Putting this PR up so others can try and build and see if it reproduces for them.
@bors
Copy link
Contributor

bors commented Feb 4, 2018

☔ The latest upstream changes (presumably #47991) made this pull request unmergeable. Please resolve the merge conflicts.

@steveklabnik
Copy link
Member Author

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 4, 2018

📌 Commit 983cc00 has been approved by alexcrichton

kennytm added a commit to kennytm/rust that referenced this pull request Feb 5, 2018
…chton

Update book

This PR does two things:

1. update the book to include rust-lang/book#1088
2. update to mdbook 0.1

Both of these things are big changes, so I want to land them now, well before the next branch, so we can kick the tires.

------------------------------

Locally, I'm seeing some weirdness around the reference and this:

![image](https://user-images.githubusercontent.com/27786/35411917-8dcbb31a-01e8-11e8-8c30-0bd280d93b9d.png)

Putting this PR up so others can try and build and see if it reproduces for them.
bors added a commit that referenced this pull request Feb 6, 2018
Rollup of 10 pull requests

- Successful merges: #46030, #47496, #47543, #47704, #47753, #47807, #47948, #47959, #48003, #48007
- Failed merges:
@bors bors merged commit 983cc00 into rust-lang:master Feb 6, 2018
@steveklabnik steveklabnik deleted the update-book branch February 6, 2018 15:44
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
* Handle input path with regards to custom css

Before, when someone like the Reference set their extra css as
"theme/reference.css" in their book.toml, this path would be treated as
relative to the invocation of mdbook, and not respect the input path. This
PR modifies these relative paths to do so.

Fixes the build of rust-lang/rust#47753 which
blocks updating rustc to mdbook 0.1

* don't use file-name

the style name is theme/reference.css, this results in a Err(StripPrefixError(())), which means that we push only the file_name, losing the theme bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants