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 dependencies. #1211

Merged
merged 10 commits into from
May 20, 2020
Merged

Update dependencies. #1211

merged 10 commits into from
May 20, 2020

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 5, 2020

Some updates to drop old dependencies. The intent here is to keep things updated and more maintainable.

  • Switch from error_chain to anyhow.
  • Update to pulldown-cmark 0.7.
  • Use warp instead of iron.
  • Remove toml-query.
  • Remove itertools.
  • Update everything else.

Closes #1107

@ehuss
Copy link
Contributor Author

ehuss commented May 5, 2020

@Dylan-DPC Don't merge this, yet. I wanted to get feedback first. Also, I'd like to get some more PRs merged first and avoid conflicts.

This is based on #1076, with some different changes. This is actually a little slower to build due to warp/hyper, but for me just by a few seconds.

I decided to go with warp for the web server. It has pretty good websocket support, among other things. This allows the websocket to serve from the same port which simplifies a lot of things, and makes it easier to run multiple servers. I've also noticed it seems a little faster, although I haven't measured.

@Dylan-DPC-zz Dylan-DPC-zz marked this pull request as draft May 5, 2020 15:04
@Dylan-DPC-zz
Copy link

converted to draft xD

@Xanewok
Copy link
Member

Xanewok commented May 5, 2020

@ehuss there's also a new release of elasticlunr-rs with strum crates bumped to 0.16, which is another step towards syn-0.15-less dep tree, so it'd be great to also include that here as well 😃

@ehuss
Copy link
Contributor Author

ehuss commented May 7, 2020

Thanks @Xanewok. Unfortunately the new version brings in a large number of new dependencies, so there is a pretty significant net increase in build times. 🤷

@Xanewok
Copy link
Member

Xanewok commented May 7, 2020

Ah, that's unfortunate. Let's see if we can fix it upstream to not unconditionally include Chinese/Japanese support.

@Xanewok
Copy link
Member

Xanewok commented May 7, 2020

Pushed mattico/elasticlunr-rs#28 that could help us cut down the newly introduced dependencies of elasticlunr if we don't enable support for Chinese/Japanese indexing.

@Xanewok
Copy link
Member

Xanewok commented May 13, 2020

A 2.3.8 version of elasticlunr-rs is released which allows to opt out of the extra crates needed to support Chinese/Japanese, so we might cut down the number new of dependencies.

@@ -117,7 +98,6 @@ pub fn execute(args: &ArgMatches) -> Result<()> {
info!("Building book...");

// FIXME: This area is really ugly because we need to re-set livereload :(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still applicable? Do we need to re-set this again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The book is loaded from scratch (and thus the config is reloaded from scratch), and it needs to inject the URL into the output.

@Xanewok Xanewok mentioned this pull request May 13, 2020
@ehuss
Copy link
Contributor Author

ehuss commented May 13, 2020

Thanks for the help with elasticlunr, that makes a big difference!

ehuss and others added 7 commits May 20, 2020 12:42
Iron does not appear to be maintained anymore. warp/hyper seems to be
reasonably maintained. Unfortunately this takes a few seconds more
to compile, but shouldn't be too bad.

One benefit is that there is no longer a need for a separate websocket
port, which makes it easier to run multiple servers at once.
@ehuss ehuss marked this pull request as ready for review May 20, 2020 21:23
@ehuss
Copy link
Contributor Author

ehuss commented May 20, 2020

@Dylan-DPC I think this should be ready to go.

@Dylan-DPC-zz Dylan-DPC-zz merged commit 6c4c344 into rust-lang:master May 20, 2020
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
* Removed the itertools dependency

* Removed an unused feature flag

* Stubbed out a toml_query replacement

* Update dependencies.

* Bump env_logger.

* Use warp instead of iron for http server.

Iron does not appear to be maintained anymore. warp/hyper seems to be
reasonably maintained. Unfortunately this takes a few seconds more
to compile, but shouldn't be too bad.

One benefit is that there is no longer a need for a separate websocket
port, which makes it easier to run multiple servers at once.

* Update pulldown-cmark to 0.7

* Switch from error-chain to anyhow.

* Bump MSRV to 1.39.

* Update elasticlunr-rs.

Co-authored-by: Michael Bryan <michaelfbryan@gmail.com>
@ehuss ehuss mentioned this pull request May 24, 2021
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 this pull request may close these issues.

Is the feature output or debug un-used?
4 participants