Description
The Github CI workflows use specific versions for mdbook tools that are different from what developers are using. E.g. mdbook is currently using 0.4.37:
but Cargo.lock would use 0.4.44 - this is regularly bumped via dependabot like in 010bd29
Lines 1640 to 1641 in 4218c95
and the developers are even instructed to use a completely different version that might not be one of those as it is not even locked (other tools are locked and might not be compatible with the "random" (most up-to-date) version of mdbook
Lines 74 to 80 in 4218c95
We should use the same versions for developers and what the CI uses.
This is especially interesting for people developing javascript/theme code as mdbook generates/copies lots of files into the target folder if they are not overriden by us.
For example our book.js is copied but https://google.github.io/comprehensive-rust/css/general.css is not in our repository not existing general.css
Two options (second is my prefered proposal)
- Keep manual overrides for the Github CI: Dev and CI are not in sync and might cause issues when someone changes the javascript code or relies on its functionality (when using mdbook serve - as in Incorrect behavior with
mdbook serve
compared to published version. #2588 - Fix the instruction to install the --locked version of mdbook and use this version in the Github CI as well. Caveat: Dependabot updates need to be reviewed carefully and as we override some things (e.g. index.hbs) we need to carefully track updates to the official files with each update.
- To make this update process reliable, write tests for the things we rely on in tests/src so things like missing theme buttons or search buttons are visible immediately.