-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Reduce dependency tree #1017
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
Comments
Binary releases are made available at https://github.com/rust-lang-nursery/mdBook/releases, which is what I use to reduce CI time (example). That may not help with There are a few deps that could maybe be trimmed, but they will unlikely make a noticeable impact. The slower dependencies (syn, serde, regex, clap) can't really be removed. You can also try to take advantage of CI caching. sccache is one option. You can also just cache |
Ah, I hadn't known about the cargo features; that will help. I currently force-install on every build to make sure that it has the latest version, so caching doesn't really help there. I'll keep an eye on the |
@bheisler until then try something like this cache:
cargo
before_script:
- test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update
- test -x $HOME/.cargo/bin/mdbook || cargo install mdbook
- cargo install-update -a |
I use Another optimisation you can use is
Thanks for pointing that out @ehuss. There's some work I'd like to do soon, so I'll see if I can upload some release binaries for |
Something that may be useful in diagnosing the cause of slow compilations is I had a quick look around c9dae17... This is the timings report: timings.zip The dependency graph: Some notes:
|
Yea, I've looked at this in the past, there are a large number of duplicated dependencies. Getting rid of toml_query seems doable, it is fairly expensive. I also noticed I've also wondered, for plugins (like |
I'm working on a minimal replacement for
The We could always split the HTML renderer out into its own executable like Historically speaking, the HTML renderer has always been a pretty messy piece of code and really tightly coupled with the core of |
Hey, thanks for the work on mdbook!
Would it be possible to try to prune mdBook's dependency tree?
My documentation build in Travis needs to download and compile ~300 crates to install mdbook on every build. This takes a long time (~10 minutes for mdbook). I then install
mdbook-linkcheck
, which depends on mdbook and so it has to recompile the whole tree again. The long compile times also make it more painful to install and use mdbook normally, or to update from older versions.The text was updated successfully, but these errors were encountered: