cargo-web icon indicating copy to clipboard operation
cargo-web copied to clipboard

Try to decrease dependencies

Open elichai opened this issue 4 years ago • 5 comments

The time it takes to compile this library is getting pretty long. especially on CIs. This is a naive start to hopefully decrease compile time. here I just disabled unused features in dependencies(just this removed around 80 lines in the Cargo.lock)

elichai avatar Aug 12 '19 18:08 elichai

Thanks for the PR!

  1. From what I can see on Travis it looks like one of your changes might have broken compilation without a Cargo.lock file. (See the job which sets WITHOUT_CARGO_LOCK=1.) Could you please check it out?
  2. Please split/squash your changes into two commits - one which changes the Cargo.toml, and one which changes the Cargo.lock. (In general I like to keep the Cargo.lock changes in a separate commit as later it's easier to browse through history, etc.) Besides this it looks good to me as long as (1) will be fixed!

koute avatar Aug 13 '19 20:08 koute

FYI it seems weird to use danger_accept_invalid_certs where it could be a HTTPS_PROXY (in general that's a weird function)

elichai avatar Aug 13 '19 22:08 elichai

Ok, it updated reqwests to a new version, so I had to update the whole Cargo.lock

Updating the cargo.lock without this PR results in: 1 file changed, 1090 insertions(+), 778 deletions(-)

With this PR: 1 file changed, 1010 insertions(+), 855 deletions(-)

Not a massive change, but a change non the less. (80 less insertions and 77 more deletions)

elichai avatar Aug 13 '19 22:08 elichai

Seems like travis fails on cargo check --target=x86_64-apple-darwin probably new version of backtrace-sys requires some system library that isn't there, why don't you run this test on osx?

elichai avatar Aug 14 '19 14:08 elichai

Ugh, it looks like a C compiler is necessary now while it wasn't necessary before; backtrace-sys really ought to not require a full cross toolchain just to run cargo check. -_-

But you have a good point. I've just removed the checks and just put them in their own dedicated jobs for OS X and Windows. We'll see how it goes.

koute avatar Aug 20 '19 21:08 koute