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 hyper crates versions #12

Merged
merged 10 commits into from
May 21, 2019
Merged

Update hyper crates versions #12

merged 10 commits into from
May 21, 2019

Conversation

kirhgoff
Copy link
Contributor

@kirhgoff kirhgoff commented May 13, 2019

Adding rollbar = "0.5.1" crate to Cargo.toml makes project fail to compile

Error

klastovirya [~/Projects/rust-buildpack-example-actix] at  add-rollbar-error-reporting !
→ cargo build                                                                                              [07d48fc]
    Blocking waiting for file lock on the registry index
    Updating crates.io index
   Compiling openssl v0.9.24
   Compiling tokio-io v0.1.12
   Compiling serde_derive v1.0.91
   Compiling tokio-threadpool v0.1.14
error: failed to run custom build command for `openssl v0.9.24`
process didn't exit successfully: `/Users/klastovirya/Projects/rust-buildpack-example-actix/target/debug/build/openssl-42343e84315ca446/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /Users/klastovirya/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Cause

from here paritytech/substrate#800

the problem is my openssl version is 1.1.1
it is not supported by
0.9.x of openssl crate :
https://github.com/sfackler/rust-openssl/blob/0.9.x/openssl/build.rs#L16
the problem is fixed in newer version of openssl crate :
https://github.com/sfackler/rust-openssl/blob/master/openssl/build.rs#L33

Solution

Use the last version of the hyper crate. Replace hyper-openssl crate with hyper-tls.

@kirhgoff kirhgoff changed the title Update hyper crates versions Update hyper crates versions WIP May 13, 2019
@RoxasShadow
Copy link
Owner

Hey @kirhgoff, thank you so much for your work :) I will merge your branch as soon as tests do pass!

@kirhgoff
Copy link
Contributor Author

@RoxasShadow yeah I am stuck a little bit with passing data from futures. Will do another effort this weekend.

@kirhgoff kirhgoff changed the title Update hyper crates versions WIP Update hyper crates versions May 17, 2019
@kirhgoff
Copy link
Contributor Author

@RoxasShadow I think the fix is ready (though I haven't tested it yet in a real app, going to do it on weekend). The main problem was to find how this new hyper version is supposed to be used, they have very slim doco and all examples just print what they receive from server and do not return it. Method send now is completely different.

I would appreciate if you will merge PR with "Squash and merge" action, I wasn't formulating my comments when was working, and don't like doing rebase, squash and merge from Github UI works perfectly. I changed the description so it could be pasted into a git commit comment.

@RoxasShadow RoxasShadow merged commit cfbf07a into RoxasShadow:master May 21, 2019
@RoxasShadow
Copy link
Owner

Thank you! I will publish the updated crate in the following days!

@kirhgoff kirhgoff deleted the updating-crates branch May 21, 2019 23:50
@RoxasShadow RoxasShadow mentioned this pull request May 22, 2019
@RoxasShadow
Copy link
Owner

Published on crates.io as v0.6.0.

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.

2 participants