databricks / click

The "Command Line Interactive Controller for Kubernetes"
Apache License 2.0
1.49k stars 84 forks source link

Error with the last release 4.0.0 #103

Closed ogabriel closed 5 years ago

ogabriel commented 5 years ago

Hi

I am was trying to set up my setup with the new version (4.0.0), but i was getting this new error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

When i use RUST_BACKTRACE=1 click:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: click::certs::try_ip_to_name
  10: click::kube::Kluster::new
  11: click::config::kube::Config::cluster_for_context
  12: click::Env::set_context
  13: <click::cmd::Context as click::cmd::Cmd>::exec
  14: click::main
  15: std::rt::lang_start::{{closure}}
  16: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  17: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  18: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  19: main
  20: __libc_start_main
  21: _start

This happens when i was trying to set my context, with all things correctly set

I have to note that:

jao commented 5 years ago

on mac os mojave after I've updated using homebrew to 0.4.0

RUST_BACKTRACE=1 click
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/libcore/result.rs:1009:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
   9: click::certs::try_ip_to_name
  10: click::kube::Kluster::new
  11: click::config::Config::cluster_for_context
  12: click::Env::set_context
  13: click::main
  14: std::rt::lang_start::{{closure}}
  15: std::panicking::try::do_call
  16: __rust_maybe_catch_panic
  17: std::rt::lang_start_internal
  18: main
JulienBreux commented 5 years ago

:warning: Unable to cargo install click

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /Users/jbx/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/build.rs:372:9
    |
372 |     let (_, _, perlasm_format) = ASM_TARGETS
    |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&(_, _, perlasm_format)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /Users/jbx/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/build.rs:710:9
    |
710 |     for (src, dst) in src_dst {
    |         ^^^^^^^^^^ help: consider using a reference: `&(src, dst)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /Users/jbx/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/build.rs:770:35
    |
770 |             RING_SRCS.iter().any(|(_, f)| cmp(f)) || RING_TEST_SRCS.iter().any(cmp),
    |                                   ^^^^^^ help: consider using a reference: `&(_, f)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> /Users/jbx/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/build.rs:771:45
    |
771 |         Some("pl") => RING_SRCS.iter().any(|(_, f)| cmp(f)) || RING_PERL_INCLUDES.iter().any(cmp),
    |                                             ^^^^^^ help: consider using a reference: `&(_, f)`

error: aborting due to 4 previous errors

error: Could not compile `ring`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `click v0.4.0`, intermediate artifacts can be found at `/var/folders/s5/j4166jjx2nx9jj8yhqqtycpm0000gn/T/cargo-install.VIf58SRofwqi`

Caused by:
  build failed
gchapim commented 5 years ago

Same issue here

asychev commented 5 years ago

Same problem. Latest click (brew install click --HEAD)

nicklan commented 5 years ago

There seem to be two issues in this thread. The panic with backtrace is fixed by #110. The unable to compile problem isn't in Click, but rather in the ring crate. I suspect you might be using an old version of Rust, but I'm not sure. Could you make sure you're on the most recent version of Rust.

I'm going to close this issue as it started out with the panic which is fixed. If you still can't compile on OSX, please open a new issue and I'll investigate. Thanks