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

Distribute binaries? #110

Closed
AmarOk1412 opened this issue May 18, 2018 · 5 comments
Closed

Distribute binaries? #110

AmarOk1412 opened this issue May 18, 2018 · 5 comments

Comments

@AmarOk1412
Copy link

You know since #100 I need to build my project with rust-nightly to get a correct coverage report.

Currently the latest nightly gives me another error related to the sqlite database. So, since one month, I use nightly-2018-03-18

It was working until some builds where cargo install cargo-tarpaulin breaks. This is the best part of the log:

   Compiling error-chain v0.10.0
   Compiling ignore v0.2.2
   Compiling object v0.4.1
   Compiling deflate v0.7.18
   Compiling quick-xml v0.9.4
   Compiling git2 v0.6.11
   Compiling syntex_pos v0.59.1
   Compiling serde_json v1.0.17
   Compiling toml v0.4.6
   Compiling semver v0.7.0
error[E0599]: no function or associated item named `to_u128` found for type `num_traits::ToPrimitive` in the current scope
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/traits.rs:250:9
    |
250 |         ToPrimitive::to_u128(self).map(u128::from_built_in)
    |         ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `num_traits::ToPrimitive`
    |
    = note: the method `to_u128` exists but the following trait bounds were not satisfied:
            `num_traits::ToPrimitive : traits::ToExtraPrimitive`
            `&num_traits::ToPrimitive : traits::ToExtraPrimitive`
            `&mut num_traits::ToPrimitive : traits::ToExtraPrimitive`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `to_u128`, perhaps you need to implement it:
            candidate #1: `traits::ToExtraPrimitive`
    = help: did you mean `to_u16`?
error[E0599]: no function or associated item named `from_built_in` found for type `u128::u128` in the current scope
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/traits.rs:250:40
    |
250 |         ToPrimitive::to_u128(self).map(u128::from_built_in)
    |                                        ^^^^^^^^^^^^^^^^^^^ function or associated item not found in `u128::u128`
    | 
   ::: /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/u128.rs:46:1
    |
46  | pub struct u128 {
    | --------------- function or associated item `from_built_in` not found for this
error[E0599]: no function or associated item named `to_i128` found for type `num_traits::ToPrimitive` in the current scope
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/traits.rs:254:9
    |
254 |         ToPrimitive::to_i128(self).map(i128::from_built_in)
    |         ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `num_traits::ToPrimitive`
    |
    = note: the method `to_i128` exists but the following trait bounds were not satisfied:
            `num_traits::ToPrimitive : traits::ToExtraPrimitive`
            `&num_traits::ToPrimitive : traits::ToExtraPrimitive`
            `&mut num_traits::ToPrimitive : traits::ToExtraPrimitive`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `to_i128`, perhaps you need to implement it:
            candidate #1: `traits::ToExtraPrimitive`
    = help: did you mean `to_i16`?
error[E0599]: no function or associated item named `from_built_in` found for type `i128::i128` in the current scope
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/traits.rs:254:40
    |
254 |           ToPrimitive::to_i128(self).map(i128::from_built_in)
    |                                          ^^^^^^^^^^^^^^^^^^^ function or associated item not found in `i128::i128`
    | 
   ::: /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/extprim-1.6.0/src/i128.rs:44:1
    |
44  | / pub struct i128(
45  | |     #[doc(hidden)]
46  | |     pub u128,
47  | | );
    | |__- function or associated item `from_built_in` not found for this
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0599`.
error: Could not compile `extprim`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-tarpaulin v0.5.6`, intermediate artifacts can be found at `/tmp/cargo-install.jN1sRd44p8T9`
Caused by:
  build failed
The command "# tarpaulin deps
  if [[ "$TRAVIS_RUST_VERSION" == nightly-2018-03-18 ]]; then
    sudo apt-get update -y && sudo apt-get -y install libssl-dev pkg-config cmake zlib1g-dev;
    cargo install cargo-tarpaulin;
  fi
  " failed and exited with 101 during .

I don't think you or me have the time to do that for now, but maybe it could be awesome to directly distribute a pre-built version of tarpaulin? This will allow users to avoid this kind of errors or even to dramatically reduce the CI time.

I think I'll make a docker for this.

Have a nice day!

@xd009642
Copy link
Owner

So currently in terms of prebuilt binaries/docker-images there is a pre-built docker image for each release on stable (but nightly versions of releases will be included from the next release) and stable and nightly for latest develop. You can see details about the docker images here. Also, on github releases I get travis to upload a version of tarpaulin compiled with the latest stable at the time for any tagged releases.

You also could install tarpaulin from the develop branch, although down to a dependency on syn this now looks like: RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin --git https://github.com/xd009642/tarpaulin --branch develop

I understand the github releases being stable isn't suitable and the docker stable/nightly might be on a nightly version that's isn't suitable. So if you have any more flexible solutions that don't require a great deal of time to maintain but are more automated I'm open to them.

@AmarOk1412
Copy link
Author

Nice! I'll look into it (after monday I think... currently in a rush)

@xd009642
Copy link
Owner

So I've actually set up travis properly so every commit into develop causes a docker hub automated build on develop with nightly and stable and also any previous releases. If there's anything more that could be useful let me know and I'll look into it 👍

@AmarOk1412
Copy link
Author

Nice :)

I'll try this week I hope. But I think this + the release tab on github is perfect.

@AmarOk1412
Copy link
Author

Yup. It's perfect.
Also #100 is now fixed for Rust stable, so I don't have to use tarpaulin on nightly anymore \o/

I close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants