Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: leetup test stop working in windows #80

Open
thenicealex opened this issue Sep 17, 2023 · 6 comments
Open

bug: leetup test stop working in windows #80

thenicealex opened this issue Sep 17, 2023 · 6 comments

Comments

@thenicealex
Copy link

In windows 11, when i run :
leetup test two-sum.cpp -t "[1,2]\n3"

The error is :

thread '' panicked at 'called 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!

@thenicealex
Copy link
Author

image

@dragfire
Copy link
Owner

dragfire commented Sep 17, 2023

Can you try with RUST_LOG=debug leetup test two-sum.cpp -t "[1,2]\n3" and paste the output here?

@thenicealex
Copy link
Author

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

image

@dragfire
Copy link
Owner

I don't have a windows machine to reproduce the issue. Can you try this https://stackoverflow.com/questions/18433840/logging-rust-programs

@thenicealex
Copy link
Author

thanks, i will try it

@dieterplex
Copy link
Contributor

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 (FGRibreau/spinners@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.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants