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

2.1.2 does not react to file changes anymore #47

Closed
simonvizzini opened this issue Oct 9, 2015 · 11 comments
Closed

2.1.2 does not react to file changes anymore #47

simonvizzini opened this issue Oct 9, 2015 · 11 comments

Comments

@simonvizzini
Copy link

Version 1.2.4 worked fine, it was reliably linting files on change. But version 2.1.2 doesn't do anything on file change. I'm on Windows 8.1 x64.

This is my npm script (watching 2 folders):

"watch:eslint": "esw -w ./ChatUI.JavaScript/src/app ./ChatUI.JavaScript/src/sdk",

and here is some output with DEBUG=esw:*:

> chat-ui@0.0.1 watch:eslint J:\source\EmbeddedChat\EmbeddedChat
> set DEBUG=esw:*&& esw -w ./ChatUI.JavaScript/src/app ./ChatUI.JavaScript/src/sdk

  esw:eslint-cli .cmd +0ms
  esw:eslint-cli J:\source\EmbeddedChat\EmbeddedChat\node_modules\.bin\eslint.cmd +3ms
  esw:eslint-help Executing help +607ms
  esw:eslint-help Help text received +774ms
  esw:eslint-help Alias found: -c +2ms
  esw:eslint-help Parsing --config +1ms
  esw:eslint-help Parsing --no-eslintrc +3ms
  esw:eslint-help Parsing --env +4ms
  esw:eslint-help Parsing --ext +2ms
  esw:eslint-help Parsing --global +4ms
  esw:eslint-help Parsing --parser +4ms
  esw:eslint-help Parsing --cache +3ms
  esw:eslint-help Parsing --cache-file +3ms
  esw:eslint-help Parsing --rulesdir +3ms
  esw:eslint-help Parsing --plugin +4ms
  esw:eslint-help Parsing --rule +3ms
  esw:eslint-help Parsing --ignore-path +3ms
  esw:eslint-help Parsing --no-ignore +4ms
  esw:eslint-help Parsing --ignore-pattern +3ms
  esw:eslint-help Parsing --stdin +3ms
  esw:eslint-help Parsing --stdin-filename +3ms
  esw:eslint-help Parsing --quiet +3ms
  esw:eslint-help Parsing --max-warnings +3ms
  esw:eslint-help Alias found: -o +4ms
  esw:eslint-help Parsing --output-file +3ms
  esw:eslint-help Alias found: -f +3ms
  esw:eslint-help Parsing --format +3ms
  esw:eslint-help Parsing --no-color +4ms
  esw:eslint-help Parsing --init +3ms
  esw:eslint-help Parsing --fix +3ms
  esw:eslint-help Parsing --debug +3ms
  esw:eslint-help Alias found: -h +4ms
  esw:eslint-help Parsing --help +3ms
  esw:eslint-help Alias found: -v +3ms
  esw:eslint-help Parsing --version +3ms
  esw:esw-cli Arguments passed: node,J:\source\EmbeddedChat\EmbeddedChat\node_modules\eslint-watch\bin\esw,-w,./ChatUI.JavaScript/src/app,./ChatUI.JavaScript/src/sdk +7ms
  esw:esw-cli Parsing args +5ms
  esw:arg-parser Directories to check: ./ChatUI.JavaScript/src/app,./ChatUI.JavaScript/src/sdk +2ms
  esw:arg-parser [ 'esw', 'iojs', 'node' ] +3ms
  esw:arg-parser contains J:\source\EmbeddedChat\EmbeddedChat\node_modules\eslint-watch\bin\esw +3ms
  esw:arg-parser [ 'esw', 'iojs', 'node' ] +3ms
  esw:arg-parser contains ./ChatUI.JavaScript/src/app +3ms
  esw:arg-parser Pushing item: ./ChatUI.JavaScript/src/app +3ms
  esw:arg-parser [ 'esw', 'iojs', 'node' ] +2ms
  esw:arg-parser contains ./ChatUI.JavaScript/src/sdk +3ms
  esw:arg-parser Pushing item: ./ChatUI.JavaScript/src/sdk +3ms
  esw:arg-parser getPath: simple-detail +3ms
  esw:esw-cli Running initial lint +2ms
Linting: ./ChatUI.JavaScript/src/app,./ChatUI.JavaScript/src/sdk
  esw:esw-cli -w seen +10ms
Watching ./ChatUI.JavaScript/src/app,./ChatUI.JavaScript/src/sdk

✓ Clean (16:52:46)

  esw:esw-cli Exiting setting exit code to: 0 +1s

Let me know if you need additional information, thanks!

@rizowski
Copy link
Owner

rizowski commented Oct 9, 2015

@simonvizzini If you do esw -v what version does it say? That prints out the eslint version. I don't think eslint is the cause but you never know lol.

@rizowski rizowski added the bug label Oct 9, 2015
@rizowski
Copy link
Owner

rizowski commented Oct 9, 2015

Also can you try saving multiple times and let me know if it picks up the file changes? I have been seeing it not pick up the first save, but after that it continues to lint fine.

It also seems to only happen when passing in multiple arguments. Passing in a single directory works as intended.

@simonvizzini
Copy link
Author

esw -v outputs "1.5.1" (just saw that eslint 1.6.0 is out, so I'll give it a try). I tried saving multiple files multiple times, but still no luck. I also just tried to watch just one folder but that doesn't work for me either.

I guess this could be a problem in the chokidar module instead. Current version is 1.2.0 (released a week ago) and this version has been installed as a dependency of eslint-watch, so maybe something is broken there. I will try to manually setup a file watcher with chokidar and see if it detects any changes. Unfortunately I have to leave now, but will try this on Monday and report back. In the meantime: have a nice weekend! =)

@rizowski
Copy link
Owner

Have you tried using 1.2.5 or 1.2.6 for eslint-watch? I am trying to figure out when this was introduced.

Neither really do much. But It all seems to revolve around that keylistener I put in.

@Cordazar
Copy link

My findings suggest that something in watcher.js messes up the input glob.

Because if I run esw . -w or esw ./ -w I will get proper linting but not any watcher that works. And if I just run esw -w and let it use the default ./ path the watcher works as it should.

I don't have time right now to debug this properly but hopefully this helps narrow down the scope. I also took a quick look at chokidar 1.2.0 but it works as it should with . or ./ .

@rizowski
Copy link
Owner

@simonvizzini @Cordazar Sorry for the delay in getting this fixed. I have been busy with work and life. I will make an effort this week in getting this resolved.

@rizowski
Copy link
Owner

@simonvizzini @Cordazar I have a fix out there pending a review. It seems like all the magic that was put into the watcher was unneeded bloat. If you wouldn't mind verifying that the fix works for you, that would be awesome and would help a lot. It's on the branch watch-fix. Sorry again for the delay.

@rizowski
Copy link
Owner

I have released what I had. It should be on version 2.1.3. I had someone test it out and they couldn't reproduce it on their machine.

@simonvizzini
Copy link
Author

Hey @rizowski, so sorry for the late response yet again. As I was getting closer to a deadline, my workload started to increase exponentially :-) But now the dust has almost settled, and I definitely want to keep my node package dependencies up-to-date. I'll update all my node modules in the next couple of days and let you know if everything is okay. Thanks a lot so far and I promise to give feedback asap

@simonvizzini
Copy link
Author

Hey again! So I finally updated my npm packages and I can confirm that the file watcher now works fine on Windows. Thanks!

@rizowski
Copy link
Owner

@simonvizzini Good to hear! 😄 Thanks for the update.

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

No branches or pull requests

3 participants