jwilm / racerd

Rust semantic analysis server powered by Racer
http://jwilm.github.io/racerd/libracerd/
Apache License 2.0
134 stars 24 forks source link

Requests fail with NotSupported, depending on $TERM #45

Open Kha opened 8 years ago

Kha commented 8 years ago

I can reproduce https://github.com/iron/logger/issues/79, even with 007aa628:

$ TERM=dumb cargo test
     Running target/debug/lib-9e020053bfe738e2

running 9 tests
ERROR:iron::iron: Error handling:
Request {
    url: Url { scheme: "http", host: Ipv4(127.0.0.1), port: 0, path: ["find_definition"], username: None, password: None, query: None, fragment: None }
    method: Post
    remote_addr: V4(127.0.0.1:37440)
    local_addr: V4(127.0.0.1:0)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }
ERROR:iron::iron: Error handling:
Request {
    url: Url { scheme: "http", host: Ipv4(127.0.0.1), port: 0, path: ["find_definition"], username: None, password: None, query: None, fragment: None }
    method: Post
    remote_addr: V4(127.0.0.1:49330)
    local_addr: V4(127.0.0.1:0)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }
POSTPOSTtest http::find_definition ... FAILED
test http::find_definition_multiple_dirty_buffers ... FAILED
ERROR:iron::iron: Error handling:
Request {
    url: Url { scheme: "http", host: Ipv4(127.0.0.1), port: 0, path: ["ping"], username: None, password: None, query: None, fragment: None }
    method: Get
    remote_addr: V4(127.0.0.1:36404)
    local_addr: V4(127.0.0.1:0)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }
GETtest http::ping_pong ... FAILED
ERROR:iron::iron: Error handling:
Request {
    url: Url { scheme: "http", host: Ipv4(127.0.0.1), port: 0, path: ["ping"], username: None, password: None, query: None, fragment: None }
    method: Get
    remote_addr: V4(127.0.0.1:33728)
    local_addr: V4(127.0.0.1:0)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }
GETtest http::ping_pong_hmac_with_correct_secret ... FAILED
test panics_when_invalid_secret_given ... ok
test util::http::server_url_builder ... ok
ERROR:iron::iron: Error handling:
Request {
    url: Url { scheme: "http", host: Ipv4(127.0.0.1), port: 0, path: ["ping"], username: None, password: None, query: None, fragment: None }
    method: Get
    remote_addr: V4(127.0.0.1:45214)
    local_addr: V4(127.0.0.1:0)
}
Error was: Error { repr: Custom(Custom { kind: Other, error: NotSupported }) }
GETtest http::ping_pong_hmac_wrong_secret ... FAILED
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: NotPresent', ../src/libcore/result.rs:688
test http::list_path_completions_std_library ... FAILED
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: NotPresent', ../src/libcore/result.rs:688
test http::find_definition_in_std_library ... FAILED

failures:

---- http::find_definition stdout ----
    url: http://127.0.0.1:40652/find_definition
thread 'http::find_definition' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330

---- http::find_definition_multiple_dirty_buffers stdout ----
    url: http://127.0.0.1:38420/find_definition
thread 'http::find_definition_multiple_dirty_buffers' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330

---- http::ping_pong stdout ----
    url: http://127.0.0.1:33567/ping
thread 'http::ping_pong' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330

---- http::ping_pong_hmac_with_correct_secret stdout ----
    thread 'http::ping_pong_hmac_with_correct_secret' panicked at 'assertion failed: `(left == right)` (left: `InternalServerError`, right: `Ok`)', tests/lib.rs:248

---- http::ping_pong_hmac_wrong_secret stdout ----
    thread 'http::ping_pong_hmac_wrong_secret' panicked at 'assertion failed: `(left == right)` (left: `InternalServerError`, right: `Forbidden`)', tests/lib.rs:279

---- http::list_path_completions_std_library stdout ----
    url: http://127.0.0.1:36302/list_completions
thread 'http::list_path_completions_std_library' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330

---- http::find_definition_in_std_library stdout ----
    url: http://127.0.0.1:39332/find_definition
thread 'http::find_definition_in_std_library' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:330

failures:
    http::find_definition
    http::find_definition_in_std_library
    http::find_definition_multiple_dirty_buffers
    http::list_path_completions_std_library
    http::ping_pong
    http::ping_pong_hmac_with_correct_secret
    http::ping_pong_hmac_wrong_secret

test result: FAILED. 2 passed; 7 failed; 0 ignored; 0 measured
jwilm commented 8 years ago

ugh. That library has a lot of problems for something that writes to stdout. Probably time to write something simpler around println!.

Thanks for the report!

Kha commented 8 years ago

I feel like I'm doing something wrong (if it wasn't a single cargo test), because I can still reproduce this on 4b8d3c74 :laughing: .

jwilm commented 8 years ago

What! Ugh. Need to drop that dependency.

micbou commented 7 years ago

@jwilm Do you plan to drop the logger dependency or update it as in PR #63? Some of our users are experiencing the issue. See https://github.com/Valloric/ycmd/issues/849.

msanders commented 6 years ago

^ I'm running into this issue as well when using racerd with emacs-ycmd. Updating the logger dependency as in PR #63 seems to fix it.