leetup
leetup copied to clipboard
bug: leetup test stop working in windows
In windows 11, when i run : leetup test two-sum.cpp -t "[1,2]\n3"
The error is :
thread 'Result::unwrap() on an Err value: NotSupported', C:\Users\liran.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\spinner-0.5.0\src\lib.rs:164:37
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Status: 403 Forbidden
Note: If error status is 4XX, make sure you are logged in!
I made sure I am logged in, but this error is still.
❯ rustc --version rustc 1.72.0 (5680fa18f 2023-08-23) ❯ leetup --version leetup 1.2.4
thanks!
Can you try with RUST_LOG=debug leetup test two-sum.cpp -t "[1,2]\n3" and paste the output here?
sorry, I don't know about rust language. In windows 11, RUST_LOG=debug not recognized. Are there other ways to debug?
i am using PowerShell 7.3.6
I don't have a windows machine to reproduce the issue. Can you try this https://stackoverflow.com/questions/18433840/logging-rust-programs
thanks, i will try it
Two separate points in this issue.
The first one is there seems having bugs in the version (1.2.0) of spinners crate that using by leetup currently. But it's working with 4.1.0 on Windows.
Technically, term crate depend by archived spinner-0.5.0 crate is the source where the error msg thread '' panicked at 'called Result::unwrap() on an Err value: NotSupported' comes from and spinner-0.5.0 crate got removed after spinner 2.0 (https://github.com/FGRibreau/spinners/commit/5481120e9).
The second one is testing without -t is not only broken on Windows but Linux.
The testdata param in graphql is not proper prepared while unwrapping None for Option<Option<String>> since nothing provided in command line.
This data should come with problem info from API or may extract from the first example input I guess.
