actix / examples

Community showcase and examples of Actix Web ecosystem usage.
Apache License 2.0
3.72k stars 807 forks source link

Hello world don't compile #86

Closed allevo closed 5 years ago

allevo commented 5 years ago

Hi! I'm trying to run 'hello-world' example.

Those are my steps

$ git clone https://github.com/actix/examples.git
Cloning into 'examples'...
remote: Enumerating objects: 264, done.
remote: Counting objects: 100% (264/264), done.
remote: Compressing objects: 100% (160/160), done.
remote: Total 1558 (delta 65), reused 263 (delta 65), pack-reused 1294
Receiving objects: 100% (1558/1558), 851.46 KiB | 1.54 MiB/s, done.
Resolving deltas: 100% (633/633), done.
$ cd examples/
$ git checkout 1.0
Branch '1.0' set up to track remote branch '1.0' from 'origin'.
Switched to a new branch '1.0'
$ git status
On branch 1.0
Your branch is up to date with 'origin/1.0'.

nothing to commit, working tree clean
$ cd hello-world/
$ cargo run
    Updating crates.io index
    Updating git repository `https://github.com/actix/actix-web.git`
    Updating git repository `https://github.com/actix/actix-http.git`
    Updating git repository `https://github.com/actix/actix-net.git`
   Compiling libc v0.2.50
   Compiling semver-parser v0.7.0
   Compiling autocfg v0.1.2
   Compiling proc-macro2 v0.4.27
   Compiling rand_core v0.4.0
   Compiling unicode-xid v0.1.0
   Compiling byteorder v1.3.1
   Compiling syn v0.15.29
   Compiling stable_deref_trait v1.1.1
   Compiling smallvec v0.6.9
   Compiling cfg-if v0.1.7
   Compiling lazy_static v1.3.0
   Compiling scopeguard v0.3.3
   Compiling slab v0.4.2
   Compiling failure_derive v0.1.5
   Compiling matches v0.1.8
   Compiling futures v0.1.25
   Compiling encoding_index_tests v0.1.4
   Compiling fnv v1.0.6
   Compiling lazycell v1.2.1
   Compiling rustc-demangle v0.1.13
   Compiling percent-encoding v1.0.1
   Compiling memchr v2.2.0
   Compiling version_check v0.1.5
   Compiling cc v1.0.30
   Compiling linked-hash-map v0.4.2
   Compiling serde v1.0.89
   Compiling ryu v0.2.7
   Compiling quick-error v1.2.2
   Compiling regex v1.1.2
   Compiling untrusted v0.6.2
   Compiling crc32fast v1.2.0
   Compiling ucd-util v0.1.3
   Compiling arc-swap v0.3.7
   Compiling safemem v0.3.0
   Compiling httparse v1.3.3
   Compiling itoa v0.4.3
   Compiling void v1.0.2
   Compiling dtoa v0.4.3
   Compiling indexmap v1.0.2
   Compiling string v0.1.3
   Compiling utf8-ranges v1.0.2
   Compiling bitflags v1.0.4
   Compiling sha1 v0.6.0
   Compiling language-tags v0.2.2
   Compiling termcolor v1.0.4
   Compiling rand_core v0.3.1
   Compiling owning_ref v0.4.0
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling backtrace v0.3.14
   Compiling semver v0.9.0
   Compiling log v0.4.6
   Compiling unicode-bidi v0.3.4
   Compiling crossbeam-utils v0.6.5
   Compiling thread_local v0.3.6
   Compiling encoding-index-japanese v1.20141219.5
   Compiling encoding-index-tradchinese v1.20141219.5
   Compiling encoding-index-simpchinese v1.20141219.5
   Compiling encoding-index-singlebyte v1.20141219.5
   Compiling encoding-index-korean v1.20141219.5
   Compiling unicode-normalization v0.1.8
   Compiling unicase v2.3.0
   Compiling lru-cache v0.1.1
   Compiling humantime v1.2.0
   Compiling regex-syntax v0.6.5
   Compiling ring v0.13.5
   Compiling miniz-sys v0.1.11
   Compiling brotli-sys v0.3.2
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling lock_api v0.1.5
   Compiling rustc_version v0.2.3
   Compiling tokio-sync v0.1.3
   Compiling actix-service v0.3.3
   Compiling actix-server-config v0.1.0 (https://github.com/actix/actix-net.git#5567fb41)
   Compiling tokio-executor v0.1.6
   Compiling encoding v0.2.33
   Compiling rand_os v0.1.3
   Compiling rand_jitter v0.1.3
   Compiling iovec v0.1.2
   Compiling net2 v0.2.33
   Compiling num_cpus v1.10.0
   Compiling socket2 v0.3.8
   Compiling hostname v0.1.5
   Compiling signal-hook v0.1.8
   Compiling time v0.1.42
   Compiling atty v0.2.11
   Compiling parking_lot_core v0.4.0
   Compiling base64 v0.9.3
   Compiling base64 v0.10.1
   Compiling hashbrown v0.1.8
   Compiling tokio-timer v0.2.10
   Compiling tokio-current-thread v0.1.5
   Compiling quote v0.6.11
   Compiling aho-corasick v0.6.10
   Compiling bytes v0.4.12
   Compiling threadpool v1.7.1
   Compiling mio v0.6.16
   Compiling resolv-conf v0.6.2
   Compiling flate2 v1.0.6
   Compiling mime v0.3.13
   Compiling tokio-io v0.1.12
   Compiling http v0.1.16
   Compiling brotli2 v0.3.2
   Compiling mio-uds v0.6.7
   Compiling tokio-codec v0.1.1
   Compiling parking_lot v0.7.1
   Compiling actix-codec v0.1.1
   Compiling actix-utils v0.3.3
   Compiling tokio-reactor v0.1.9
   Compiling serde_json v1.0.39
   Compiling tokio-tcp v0.1.3
   Compiling tokio-udp v0.1.3
   Compiling actix-rt v0.2.0
   Compiling tokio-signal v0.2.7
   Compiling env_logger v0.6.1
   Compiling actix-server v0.3.1 (https://github.com/actix/actix-net.git#5567fb41)
   Compiling h2 v0.1.16
   Compiling actix-router v0.1.0
   Compiling synstructure v0.10.1
   Compiling enum-as-inner v0.2.1
   Compiling derive_more v0.14.0
   Compiling actix-web-codegen v0.1.0 (https://github.com/actix/actix-web.git?branch=1.0#96804230)
   Compiling idna v0.1.5
   Compiling failure v0.1.5
   Compiling url v1.7.2
   Compiling trust-dns-proto v0.7.1
   Compiling serde_urlencoded v0.5.4
   Compiling cookie v0.11.0
   Compiling trust-dns-resolver v0.11.0-alpha.2
   Compiling actix-connector v0.3.0
   Compiling actix-http v0.1.0 (https://github.com/actix/actix-http.git#64360041)
   Compiling actix-web v1.0.0-alpha.1 (https://github.com/actix/actix-web.git?branch=1.0#96804230)
error[E0277]: the trait bound `actix_server_config::Io<tokio_tcp::stream::TcpStream>: tokio_io::async_read::AsyncRead` is not satisfied
   --> /Users/personale/.cargo/git/checkouts/actix-web-02c803d355aed967/9680423/src/server.rs:241:58
    |
241 |         self.builder = Some(self.builder.take().unwrap().listen(
    |                                                          ^^^^^^ the trait `tokio_io::async_read::AsyncRead` is not implemented for `actix_server_config::Io<tokio_tcp::stream::TcpStream>`
    |
    = note: required because of the requirements on the impl of `actix_service::NewService<actix_server_config::ServerConfig>` for `actix_http::service::service::HttpService<actix_server_config::Io<tokio_tcp::stream::TcpStream>, S, B>`
    = note: required because of the requirements on the impl of `actix_server::services::ServiceFactory` for `[closure@/Users/personale/.cargo/git/checkouts/actix-web-02c803d355aed967/9680423/src/server.rs:244:13: 250:14 cfg:_, factory:_]`

error[E0277]: the trait bound `actix_server_config::Io<tokio_tcp::stream::TcpStream>: tokio_io::async_write::AsyncWrite` is not satisfied
   --> /Users/personale/.cargo/git/checkouts/actix-web-02c803d355aed967/9680423/src/server.rs:241:58
    |
241 |         self.builder = Some(self.builder.take().unwrap().listen(
    |                                                          ^^^^^^ the trait `tokio_io::async_write::AsyncWrite` is not implemented for `actix_server_config::Io<tokio_tcp::stream::TcpStream>`
    |
    = note: required because of the requirements on the impl of `actix_service::NewService<actix_server_config::ServerConfig>` for `actix_http::service::service::HttpService<actix_server_config::Io<tokio_tcp::stream::TcpStream>, S, B>`
    = note: required because of the requirements on the impl of `actix_server::services::ServiceFactory` for `[closure@/Users/personale/.cargo/git/checkouts/actix-web-02c803d355aed967/9680423/src/server.rs:244:13: 250:14 cfg:_, factory:_]`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `actix-web`.

To learn more, run the command again with --verbose.
$ rustc --version
rustc 1.32.0 (9fda7c223 2019-01-16)
$ cargo --version
cargo 1.32.0 (8610973aa 2019-01-02)

Where am I wrong? The master works well

Thanks

(This blocks another PR of mine)

fafhrd91 commented 5 years ago

try again, i forgot to push changes. run "cargo update" first