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

Watch for file creation events in watch mode #117

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

shaunbennett
Copy link
Contributor

@shaunbennett shaunbennett commented Mar 6, 2019

Currently watch mode only watches for DebouncedEvent::Chmod and DebouncedEvent::Write. There are some edge cases where these events wont be called even when a file is modified.

For example, if the user is using vim with swap files enabled, it seems like only a Remove and then Create event is called for the rust file. Usually this is okay because there will also be a swp file being modified, but if the user has their swap files placed in a different directory, rustlings watch does not work.

This fixes the issue by also listening for the Create event, and only triggering for .rs files (so swp file changes are ignored).

I'm guessing that this may be related to #111, as I ran into the same issue and started looking into why watch wasn't working.

@komaeda komaeda added the C-enhancement Category: Enhancement label Mar 6, 2019
@komaeda
Copy link
Contributor

komaeda commented Mar 6, 2019

thanks for your contribution! ❤️

@komaeda komaeda merged commit 7d6e281 into rust-lang:master Mar 6, 2019
pedantic79 pushed a commit to pedantic79/rustlings that referenced this pull request Apr 11, 2020
Watch for file creation events in watch mode
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
Watch for file creation events in watch mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants