rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
54.01k stars 10.15k forks source link

`n` KeyCode for 'next exercise' not working #2111

Closed ndom91 closed 1 month ago

ndom91 commented 1 month ago

So I've installed rustlings successfully and generated the directory of files. I then started and tried to move on from the first exercise, however pressing n is not having any effect. The first exercise doesn't really require any changes to be able to move on, right? And the second one is just printline -> println, right? I hope I'm not just missing something simple haha.

Anyway, the other keycodes defined here all do work, like h for help or l for list. Once in the list, I can navigate up and down, press c to continue from various exercises, etc.

I tried 6.3.0 with the automatic input recognition as well as 6.2.0 where you apparently have to confirm with Enter, both do not work as expected :thinking:

I'm normally using the latest kitty as a terminal with tmux. But I tried it in kitty without tmux as well as in the latest alacritty with and without tmux, all with the same issue.

Anything else I can provide to help debug?

ndom91 commented 1 month ago

Okay, I got it working, but I am not any smarter because of it :joy:

So I'm using NixOS and I had rustc and cargo manually installed initially. When I removed those and installed rustup from nixpkgs and installed the latest stable rust toolchain from rustup, and then tried rustlings (latest version, 6.3.0) again, it worked!

Previously I also wasn't even shown the n button hint below the progress bar, but now I am and it works as expected.

mo8it commented 1 month ago

Huh, weird. If we can reproduce it, maybe we could exit with a helpful message.

FlafyDev commented 1 month ago

you probably didn't have clippy in PATH (it shows an error while its running). nix shell nixpkgs#clippy fixed it. (at least that was the problem for me)