Skip to content

Docs are built with an old pinned version of mdbook #20

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
austinglaser opened this issue Nov 11, 2019 · 6 comments
Closed

Docs are built with an old pinned version of mdbook #20

austinglaser opened this issue Nov 11, 2019 · 6 comments

Comments

@austinglaser
Copy link

This is causing rendering differences, as discussed in this book issue

@austinglaser
Copy link
Author

I think there's some further discussion to be had here, about a couple of topics:

The first reasonable idea which occurs to me would be to have each book repo download a stub install.sh script from this repo. Books that need more tools to be installed (i.e. the embedonomicon) can wrap that stub to do that.

Whatever the decision, I'm happy to open a series of PRs to at minimum normalize this behavior. If there's consensus on a good way to keep this synchronized across multiple projects, I'm also happy to implement that.

CC @adamgreig, since you chimed in on one of the original issues here

@therealprof
Copy link
Contributor

@austinglaser

Thanks for writing this up!

I'm not sure how the original mdbook decision came to be, maybe @japaric or @jamesmunns have more information about that.

Originally the mdbook version was freewheeling, we pinned v0.2.1 exactly for that reason and put reminders in place to undo it as soon as we can.

IMHO the most relevant questions are:

  • Is the actually used version of mdbook relevant?
  • Is it also relevant that all books are on the same version of mdbook? (And if so, how can we ensure that they're actually rebuilt when the version changes?)

Since the embedded book is linked on the rust-lang homepage, do we need to use the same version of mdbook they do for the rest of the documentation?

@austinglaser
Copy link
Author

Is it also relevant that all books are on the same version of mdbook? (And if so, how can we ensure that they're actually rebuilt when the version changes?)

I believe so. Some of the confusion surrounding rust-embedded/book#212 resulted from two different versions (0.2.1 and 0.3.4) being used to render the book when hosted in two different places

Is it also relevant that all books are on the same version of mdbook? (And if so, how can we ensure that they're actually rebuilt when the version changes?)

I think enforcing this would at least simplify the above.

@jamesmunns
Copy link
Member

Regarding the original decision:

  • We used to use freewheeling, probably for no particularly good reason
  • At some point, mdbook wasn't posting the build artifacts as part of their release. This caused the trust tool to get confused, as it expected the "latest published on crates.io" to == "latest artifacts published on github". This caused CI failures.
  • Due to this, we then began pinning versions

Regarding harmony with the upstream Rust docs:

  • Originally, we were the only users of mdbook 0.2.x, while older books were still on 0.1.x. I implemented a workaround to allow the upstream docs to build on EITHER 0.1 or 0.2 on a per-book basis
  • Since then, I believe all books have been updated, and all are using a current version of mdbook, which is currently based on 0.3.x, currently 0.3.5 as of the time of this writing.

We should probably use whatever the upstream Rust project uses, unless we have a good reason, but I can't think of a good way to enforce this outside of curl | grep to get the version from this cargo.toml file, which seems... fragile.

@jamesmunns
Copy link
Member

I also would not mind converging all of the books to a single git repo, to avoid duplication. This would have negative impact to our use of github pages as the base URL though.

@therealprof
Copy link
Contributor

The pinning has been removed via #24.

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

Successfully merging a pull request may close this issue.

3 participants