error on editor start: clap Must use `Arg::allow_invalid_utf8`
As reported by Gabriel Pickl:
Shortly after downloading the
rocbinary, the editor opened properly and created anew_roc_projectfolder. After clearing up some tooling to allow the default roc platform to build (my XCode was out of date and thus clang was broken), trying to runroc edit .again results in the following error:
thread 'main' panicked at 'Must use `Arg::allow_invalid_utf8` with `_os` lookups', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.20/src/parser/matches/arg_matches.rs:1784:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Notably,
/Users/runnerdoesn't exist, as there is norunneruser. My first assumption was that updating XCode broke some LLVM IR cargo was caching, but now I'm actually not sure what's going on.
Here's the back trace from my machine when it encountered the same problem:
thread 'main' panicked at 'Must use `Arg::allow_invalid_utf8` with `_os` lookups', /Users/chrisduncan/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.20/src/parser/matches/arg_matches.rs:1780:1
stack backtrace:
0: rust_begin_unwind
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
2: clap::parser::matches::arg_matches::unwrap_os_string
at /Users/chrisduncan/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.20/src/parser/matches/arg_matches.rs:1784:13
3: clap::parser::matches::arg_matches::unwrap_os_string{{reify.shim}}
at /Users/chrisduncan/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.20/src/parser/matches/arg_matches.rs:1780:1
4: core::ops::function::FnMut::call_mut
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:150:5
5: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:280:13
6: core::option::Option<T>::map
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/option.rs:912:29
7: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/iter/adapters/map.rs:103:9
8: <clap::parser::matches::arg_matches::OsValues as core::iter::traits::iterator::Iterator>::next
at /Users/chrisduncan/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.20/src/parser/matches/arg_matches.rs:1667:9
9: roc::main::{{closure}}
at /Users/chrisduncan/Development/open-source-forks/roc/crates/cli/src/main.rs:185:35
10: core::option::Option<T>::map
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/option.rs:912:29
11: roc::main
at /Users/chrisduncan/Development/open-source-forks/roc/crates/cli/src/main.rs:183:19
12: core::ops::function::FnOnce::call_once
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
Zulip topic for reference
Can someone who encountered this error before try cargo run --release edit on the editor_launch_fix branch.
The editor is working for me on nixos and macos 12 (apple silicon).
On that branch I've also added a CI test that checks the editor can launch successfully.
The editor_launch_fix branch is merged.