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

rustlings watch halts when starting to edit file with emacs #673

Closed
tanj opened this issue Mar 18, 2021 · 7 comments
Closed

rustlings watch halts when starting to edit file with emacs #673

tanj opened this issue Mar 18, 2021 · 7 comments

Comments

@tanj
Copy link

tanj commented Mar 18, 2021

When ever I start to edit a file with emacs rustlings watch ends with ★ All exercises completed! ★

GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) on Windows 10 Pro Version 10.0.19042 Build 19042

Steps to reproduce:

  1. % /c/Program\ Files/Emacs/x86_64/bin/runemacs.exe -Q
  2. Run rustlings watch in external shell (not in emacs)
  3. Open rustlings/exercises/variables/variables1.rs
  4. Insert any text (no save needed)
  5. rustlings watch ends with ★ All exercises completed! ★
@tanj
Copy link
Author

tanj commented Mar 18, 2021

Looks like it is related to this https://stackoverflow.com/questions/5738170/why-does-emacs-create-temporary-symbolic-links-for-modified-files

Seems this is as issue for npm as well.

It seems to be fine if the file exists when rustlings watch starts. So it must have something to do with the creation of the symlink that causes the program to end.

The solution seems to be to not create lock files by setting (setq create-lockfiles nil) in .emacs or other init file locations.

I'm not sure if there is a way to handle this in the rustlings app. If you don't feel it's in your scope to fix feel free to close this.

@jrvidal
Copy link
Contributor

jrvidal commented Mar 18, 2021

What's the filename of those symlinks? Do they still have a .rs extension by any chance? If that's the case, it would confuse rustlings watch.

@tanj
Copy link
Author

tanj commented Mar 18, 2021

the symlinks named with the file name and prepended with .# So variables1.rs would create a symlink as .#variables1.rs

@jrvidal
Copy link
Contributor

jrvidal commented Mar 18, 2021

Sorry, should have asked before: which version of rustlings are you using?

@tanj
Copy link
Author

tanj commented Mar 19, 2021

9f61db5

@jrvidal
Copy link
Contributor

jrvidal commented Mar 19, 2021

Could you please try the latest release? We introduced some changes in #599 that I think will fix your issue.

@tanj
Copy link
Author

tanj commented Mar 19, 2021

Oh, I didn't realize you weren't using the master branch and had switched to main.

I originally installed via the command curl -L https://git.io/rustlings | bash which I got from this repo's README.md

that git.io link currently points to https://raw.githubusercontent.com/rust-lang/rustlings/master/install.sh

Tested with the head of main 0d894e6 and the problem is resolved.

Thanks for your help

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

2 participants