dpc / mioco.pre-0.9

Scalable, coroutine-based, asynchronous IO handling library for Rust programming language. (aka MIO COroutines).
Mozilla Public License 2.0
457 stars 30 forks source link

build failure with nightly #118

Closed gregwebs closed 8 years ago

gregwebs commented 8 years ago

I am a new rust user. It seems mioco can only be compiled on nightly due to its usage of features. On nightly I get the following error:

/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.0/src/coroutine.rs:246:35: 246:47 error: no method named `into_inner` found for type `std::panic::AssertRecoverSafe<F>` in the current scope
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.0/src/coroutine.rs:246                 coroutine_user_fn.into_inner()()
                                                                                                                         ^~~~~~~~~~~~
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.0/src/coroutine.rs:246:35: 246:47 help: items from traits can only be used if the trait is implemented and in scope; the following traits define an item `into_inner`, perhaps you need to implement one of them:
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.0/src/coroutine.rs:246:35: 246:47 help: candidate #1: `std::sys_common::IntoInner`
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.0/src/coroutine.rs:246:35: 246:47 help: candidate #2: `net2::IntoInner`
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
Could not compile `mioco`.
dpc commented 8 years ago

Fixed in 0.4.1. Thanks for reporting!

gregwebs commented 8 years ago

Thanks for fixing! I did run into another issue

    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading mioco v0.4.1
   Compiling mioco v0.4.1
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.1/src/coroutine.rs:238:37: 238:61 error: cannot invoke tuple struct constructor with private fields [E0450]
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.1/src/coroutine.rs:238             let coroutine_user_fn = panic::AssertRecoverSafe(coroutine_user_fn);
                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~
/root/.cargo/registry/src/github.com-88ac128001ac3a9a/mioco-0.4.1/src/coroutine.rs:238:37: 238:61 help: run `rustc --explain E0450` to see a detailed explanation
error: aborting due to previous error
Could not compile `mioco`.
dpc commented 8 years ago

I can't reproduce. I think you might have to update to the latest nightly.

gregwebs commented 8 years ago

Yeah, I was using a docker image that hasn't been updated for 2 weeks. I updated to the latest nightly and it worked.