tailhook / rotor-http

The mio/rotor based http server library for rust (UNMAINTAINED, use tk-http)
MIT License
110 stars 11 forks source link

error in run example : hello_world_server #6

Closed szagi3891 closed 8 years ago

szagi3891 commented 8 years ago
grzegorz@grzegorz:~/Pulpit/rust/rotor-http$ cargo run --example hello_world_server
   Compiling bitflags v0.1.1
   Compiling libc v0.1.12
   Compiling log v0.3.3
   Compiling rustc-serialize v0.3.16
   Compiling traitobject v0.0.1
   Compiling bitflags v0.3.3
   Compiling libc v0.2.2
   Compiling winapi-build v0.1.1
   Compiling nix v0.3.9
   Compiling pkg-config v0.3.6
   Compiling lazy_static v0.1.15
   Compiling typeable v0.1.2
   Compiling netbuf v0.2.3
   Compiling winapi v0.2.5
   Compiling memchr v0.1.7
   Compiling hpack v0.2.0
   Compiling solicit v0.4.4
   Compiling bytes v0.2.11
   Compiling advapi32-sys v0.1.2
   Compiling winapi v0.1.23
   Compiling language-tags v0.0.7
   Compiling unicase v1.0.1
   Compiling slab v0.1.2
   Compiling argparse v0.2.1
   Compiling kernel32-sys v0.2.1
   Compiling time v0.1.34
   Compiling gcc v0.3.19
   Compiling openssl-sys v0.6.7
   Compiling matches v0.1.2
   Compiling num_cpus v0.2.9
   Compiling openssl v0.6.7
   Compiling httparse v1.0.0
   Compiling mio v0.4.4
   Compiling rotor v0.3.0 (git://github.com/tailhook/rotor?rev=c4d8544#c4d8544b)
   Compiling rand v0.3.12
   Compiling uuid v0.1.18
   Compiling url v0.2.38
   Compiling num v0.1.28
   Compiling serde v0.6.1
   Compiling mime v0.1.1
   Compiling cookie v0.1.21
   Compiling hyper v0.6.16
   Compiling rotor-http v0.3.0 (file:///home/grzegorz/Pulpit/rust/rotor-http)
src/http1.rs:18:5: 18:17 error: unresolved import `rotor::Scope`. There is no `Scope` in `rotor` [E0432]
src/http1.rs:18 use rotor::Scope;
                    ^~~~~~~~~~~~
src/http1.rs:18:5: 18:17 help: run `rustc --explain E0432` to see a detailed explanation
error: aborting due to previous error
Could not compile `rotor-http`.

To learn more, run the command again with --verbose.
grzegorz@grzegorz:~/Pulpit/rust/rotor-http$ cargo run --example hello_world_server --verbose
       Fresh unicase v1.0.1
       Fresh language-tags v0.0.7
       Fresh libc v0.1.12
       Fresh httparse v1.0.0
       Fresh log v0.3.3
       Fresh hpack v0.2.0
       Fresh traitobject v0.0.1
       Fresh pkg-config v0.3.6
       Fresh argparse v0.2.1
       Fresh libc v0.2.2
       Fresh winapi-build v0.1.1
       Fresh bitflags v0.1.1
       Fresh nix v0.3.9
       Fresh netbuf v0.2.3
       Fresh matches v0.1.2
       Fresh lazy_static v0.1.15
       Fresh rustc-serialize v0.3.16
       Fresh memchr v0.1.7
       Fresh typeable v0.1.2
       Fresh bytes v0.2.11
       Fresh gcc v0.3.19
       Fresh openssl-sys v0.6.7
       Fresh bitflags v0.3.3
       Fresh solicit v0.4.4
       Fresh winapi v0.2.5
       Fresh advapi32-sys v0.1.2
       Fresh rand v0.3.12
       Fresh uuid v0.1.18
       Fresh url v0.2.38
       Fresh num v0.1.28
       Fresh serde v0.6.1
       Fresh mime v0.1.1
       Fresh kernel32-sys v0.2.1
       Fresh num_cpus v0.2.9
       Fresh time v0.1.34
       Fresh winapi v0.1.23
       Fresh openssl v0.6.7
       Fresh cookie v0.1.21
       Fresh hyper v0.6.16
       Fresh slab v0.1.2
       Fresh mio v0.4.4
       Fresh rotor v0.3.0 (git://github.com/tailhook/rotor?rev=c4d8544#c4d8544b)
   Compiling rotor-http v0.3.0 (file:///home/grzegorz/Pulpit/rust/rotor-http)
     Running `rustc src/lib.rs --crate-name rotor_http --crate-type lib -g --out-dir /home/grzegorz/Pulpit/rust/rotor-http/target/debug --emit=dep-info,link -L dependency=/home/grzegorz/Pulpit/rust/rotor-http/target/debug -L dependency=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps --extern mio=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libmio-dbc0cc3d599ba9c2.rlib --extern rotor=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/librotor-1a405622f02e1d60.rlib --extern netbuf=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libnetbuf-d23411602596252f.rlib --extern log=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/liblog-02163cd70dc94e33.rlib --extern httparse=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libhttparse-d0ff8e01328d7e82.rlib --extern time=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libtime-78927599ef4c022b.rlib --extern hyper=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libhyper-054c763e90bf0d1e.rlib -L native=/usr/lib/i386-linux-gnu -L native=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/build/openssl-sys-5d88fd19b574d5eb/out`
src/http1.rs:18:5: 18:17 error: unresolved import `rotor::Scope`. There is no `Scope` in `rotor` [E0432]
src/http1.rs:18 use rotor::Scope;
                    ^~~~~~~~~~~~
src/http1.rs:18:5: 18:17 help: run `rustc --explain E0432` to see a detailed explanation
error: aborting due to previous error
Could not compile `rotor-http`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name rotor_http --crate-type lib -g --out-dir /home/grzegorz/Pulpit/rust/rotor-http/target/debug --emit=dep-info,link -L dependency=/home/grzegorz/Pulpit/rust/rotor-http/target/debug -L dependency=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps --extern mio=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libmio-dbc0cc3d599ba9c2.rlib --extern rotor=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/librotor-1a405622f02e1d60.rlib --extern netbuf=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libnetbuf-d23411602596252f.rlib --extern log=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/liblog-02163cd70dc94e33.rlib --extern httparse=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libhttparse-d0ff8e01328d7e82.rlib --extern time=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libtime-78927599ef4c022b.rlib --extern hyper=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/deps/libhyper-054c763e90bf0d1e.rlib -L native=/usr/lib/i386-linux-gnu -L native=/home/grzegorz/Pulpit/rust/rotor-http/target/debug/build/openssl-sys-5d88fd19b574d5eb/out` (exit code: 101)
tailhook commented 8 years ago

Well, It seems you use future branch. It seems it may compile with 8906cc7 version of rotor. But AFAICS the examples were never adapted to that version of rotor.

Anyway, I'm rewriting rotor-http in rotor_stream branch now. It is based on rotor-stream crate and is going to be a much more complete implementation of HTTP. Unfortunately, that branch doesn't work too at the moment (just too incomplete)

tailhook commented 8 years ago

Okay. hello_world_server in current master compiles and works. There are few unimplemented's and and other examples are in the works now, but I think this issue is fulfilled anyway :)