upgrade: migrate mdbook to 0.5.3#3207
Conversation
|
This commit has a workaround for the blocker for the |
qwandor
left a comment
There was a problem hiding this comment.
See also #3075, where I made a bunch of the same fixes.
I think we should wait for a new release of mdbook-svgbob first. @mgeisler aren't you a maintainer of it? Can you get boozook/mdbook-svgbob#98 merged and a new release out?
|
|
||
| # Sanitize book.toml for mdbook 0.5 compatibility | ||
| sed -i '/multilingual/d' book.toml | ||
| sed -i '/curly-quotes/d' book.toml |
There was a problem hiding this comment.
Why is this necessary? Can't the book.toml be rather than patching it here?
There was a problem hiding this comment.
Ah… I did not see #3075 and only checked the issues and did not find anything in there.
Regarding why this the sed is necessary (I assumed a missing "modified" in the sentence): because of the way we support translations at the moment - see #3201 - we cannot simply use the fresh book.toml for these reasons but the old one does not play nice with the new version so we need to make them compatible or the translation webpages get stale because they are not built with new versions anymore.
There was a problem hiding this comment.
I think the actual problem is that book.toml became backdated as of #2658. That was not originally the case, but I understand it happened so that the Rust edition field from the backdated book.toml can apply.
I'm restructuring this as we speak with my Bazel build: there I use book.toml from latest main, but I adopt the Rust edition from the backdated book.toml file.
That should give us correct semantics: we build all translations with the current version of mdbook and we do so with the latest and greatest book.toml file. The translations altern content, and some of this content is Rust code, which means that we must respect the Rust edition in force at the time of the translation.
I hope you can merge this and then I'll rebase and update my unpushed work with Bazel on top of this.
There was a problem hiding this comment.
I just published mdbook-svgbob 0.3.0 with mdbook 5.0 support thanks to the updates from @qwandor!
Oh, right, indeed I am 😄 I approved your PR and I should be able to make a release now. |
7f0def6 to
5860182
Compare
|
I included mdbook-svgbob-0.3.0 - tests are running |
|
@mgeisler can you have a look at the new bazel cache layer. Seems to be a bit heavy.
/usr/bin/tar: ../../../.cache/bazel-repo/content_addressable/sha256/ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf: Cannot mkdir: No space left on device
|
This commit upgrades mdbook from 0.4.52 to 0.5.3, which is a major upgrade with breaking changes. Key changes: - Upgraded mdbook to 0.5.3, mdbook-pandoc to 0.11.0, mdbook-i18n-helpers to 0.4.0, and mdbook-linkcheck2 to 0.12.0 in `xtask` for mdbook 0.5 compatibility. - Migrated local preprocessor plugins `mdbook-course` and `mdbook-exerciser` to use the new split crates structure of mdbook 0.5 (mdbook-core, mdbook-preprocessor, mdbook-renderer). - Replaced usage of removed `preprocess::CmdPreprocessor` with `mdbook_preprocessor::parse_input`. - Replaced usage of removed `Config::get_renderer` with generic `Config::get`. - Updated trait implementations to match new signatures (e.g. `supports_renderer` returning `Result<bool>`). - Refactored `mdbook-exerciser` configuration parsing to deserialize into a structured `Config` struct. - Migrated `theme/index.hbs` and `theme/book.js` to match the default files of mdbook 0.5.3, preserving local modifications (speaker notes, language picker, redbox, etc.). - Updated speaker notes icons in `theme/index.hbs` and `theme/speaker-notes.js` to use `xmark` and `arrow-up-right-from-square` SVG templates for FontAwesome 6 compatibility (see renamed icons in https://docs-v6.fontawesome.com/web/setup/upgrade/whats-changed#icons-renamed-in-version-6). - Updated WebdriverIO test suite (`tests/`) to: - Support the new `mdbook-` prefixed HTML IDs (e.g., `#mdbook-sidebar`, `#mdbook-theme-toggle`). - Robustly handle `default_theme` verification by accepting either "light" or "navy" depending on the host system's prefers-color-scheme setting. - Upgraded `mdbook-svgbob` to 0.3.0 (which supports mdbook 0.5) and restored its installation from crates.io. - Updated `.github/workflows/build.sh` to sanitize the restored historical `book.toml` (removing deprecated `multilingual` and `curly-quotes` keys) to ensure compatibility with the `mdbook` 0.5.3 configuration parser. Fixes google#3201
5860182 to
59a60a5
Compare
This commit upgrades mdbook from 0.4.52 to 0.5.3, which is a major upgrade with breaking changes.
Key changes:
xtaskfor mdbook 0.5 compatibility.mdbook-courseandmdbook-exerciserto use the new split crates structure of mdbook 0.5 (mdbook-core, mdbook-preprocessor, mdbook-renderer).preprocess::CmdPreprocessorwithmdbook_preprocessor::parse_input.Config::get_rendererwith genericConfig::get.supports_rendererreturningResult<bool>).mdbook-exerciserconfiguration parsing to deserialize into a structuredConfigstruct.theme/index.hbsandtheme/book.jsto match the default files of mdbook 0.5.3, preserving local modifications (speaker notes, language picker, redbox, etc.).theme/index.hbsandtheme/speaker-notes.jsto usexmarkandarrow-up-right-from-squareSVG templates for FontAwesome 6 compatibility (see renamed icons in https://docs-v6.fontawesome.com/web/setup/upgrade/whats-changed#icons-renamed-in-version-6).tests/) to:mdbook-prefixed HTML IDs (e.g.,#mdbook-sidebar,#mdbook-theme-toggle).default_themeverification by accepting either "light" or "navy" depending on the host system's prefers-color-scheme setting.mdbook-svgbobto 0.3.0 (which supports mdbook 0.5)..github/workflows/build.shto sanitize the restored historicalbook.toml(removing deprecatedmultilingualandcurly-quoteskeys) to ensure compatibility with themdbook0.5.3 configuration parser.Fixes #3201