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

Autowatch with wildcards doesn't work #1249

Closed
y-lohse opened this issue Nov 21, 2014 · 8 comments
Closed

Autowatch with wildcards doesn't work #1249

y-lohse opened this issue Nov 21, 2014 · 8 comments

Comments

@y-lohse
Copy link

y-lohse commented Nov 21, 2014

Hi,
In my karma config, I am watching some files directly, and some via wildcards. autowatch is set to true and works fine for directly referenced files, but not for those who should be matched by wildcards.

I don't think this is related to #895. I tried using diferent text editors and setting usePolling to true but to no effect.

I'm using:

  • karma v0.12.23
  • node v0.11.13
  • windows seven

I'm attaching the watcher logs below. Sorry for the formatting... you know, windows "terminal" 😒

DEBUG [watcher]: Resolved files:
        c:/Users/caldera/Documents/GitHub/Kerouac/node_modules/karma-jasmine/lib
/jasmine.js
        c:/Users/caldera/Documents/GitHub/Kerouac/node_modules/karma-jasmine/lib
/boot.js
        c:/Users/caldera/Documents/GitHub/Kerouac/node_modules/karma-jasmine/lib
/adapter.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/jquery-custom/jquery.mi
n.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/slip/slip.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/composer/composer.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/mousetrap/mousetrap.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/moment-custom/moment-wi
th-langs.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular/angular.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-route/angular-r
oute.min.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-touch/angular-t
ouch.min.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-animate/angular
-animate.min.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/ng-file-upload/angular-
file-upload.min.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-filesystem/angu
lar-filesystem.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-md5/angular-md5
.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-scroll/angular-
scroll.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-websocket/angul
ar-websocket.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-gestures/gestur
es.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-translate/angul
ar-translate.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-translate-loade
r-static-files/angular-translate-loader-static-files.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-sanitize/angula
r-sanitize.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-moment/angular-
moment.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-mocks/angular-m
ocks.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angular-cookies/angular
-cookies.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/storage/Storage.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/ChromeProvider/ChromePr
ovider.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/app/app.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/app/controllers.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/app/directives.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/app/filters.js
        C:/Users/caldera/Documents/GitHub/Kerouac/js/app/services.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/mock/MockData.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/controllers/IndexSpe
c.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/controllers/SpoolerS
pec.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/controllers/ModesSpe
c.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/controllers/Explorer
Spec.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/controllers/Settings
Spec.js
        C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/filters/FiltersSpec.
js
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/jque
ry-custom/jquery.min.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/slip
/slip.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/comp
oser/composer.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/mous
etrap/mousetrap.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/mome
nt-custom/moment-with-langs.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar/angular.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-route/angular-route.min.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-touch/angular-touch.min.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-animate/angular-animate.min.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/ng-f
ile-upload/angular-file-upload.min.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-filesystem/angular-filesystem.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-md5/angular-md5.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-scroll/angular-scroll.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-websocket/angular-websocket.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-gestures/gestures.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-translate/angular-translate.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-translate-loader-static-files/angular-translate-loader-static-files.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-sanitize/angular-sanitize.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-moment/angular-moment.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-mocks/angular-mocks.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-cookies/angular-cookies.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/stor
age/Storage.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/Chro
meProvider/ChromeProvider.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/js/app"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/mock"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/IndexSpec.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/SpoolerSpec.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/ModesSpec.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/ExplorerSpec.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/SettingsSpec.js"
DEBUG [watcher]: Watching "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/f
ilters/FiltersSpec.js"
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/mome
nt-custom/moment-with-langs.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/mous
etrap/mousetrap.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-touch/angular-touch.min.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-route/angular-route.min.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/slip
/slip.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-animate/angular-animate.min.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/comp
oser/composer.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/ng-f
ile-upload/angular-file-upload.min.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar/angular.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-filesystem/angular-filesystem.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-scroll/angular-scroll.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-websocket/angular-websocket.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-md5/angular-md5.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-translate/angular-translate.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-translate-loader-static-files/angular-translate-loader-static-files.js" igno
red. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-moment/angular-moment.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-sanitize/angular-sanitize.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-gestures/gestures.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-mocks/angular-mocks.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/angu
lar-cookies/angular-cookies.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/stor
age/Storage.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/js/lib/Chro
meProvider/ChromeProvider.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/ModesSpec.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/f
ilters/FiltersSpec.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/ExplorerSpec.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/SpoolerSpec.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/SettingsSpec.js" ignored. Already in the list.
DEBUG [watcher]: Add file "C:/Users/caldera/Documents/GitHub/Kerouac/test/unit/c
ontrollers/IndexSpec.js" ignored. Already in the list.

i can attach my karma conf if it helps but it's pretty standard. The files watched via wildcards are resolved in the logs above, but changes have no effect.

@maksimr
Copy link
Contributor

maksimr commented Nov 21, 2014

@y-lohse can you create small(small as possible) gist which reproduce this problem.
Thanks!

@y-lohse
Copy link
Author

y-lohse commented Nov 21, 2014

Yup, there you go: https://gist.github.com/y-lohse/4b09cdf3a2fae560a65f

@maksimr
Copy link
Contributor

maksimr commented Nov 21, 2014

@y-lohse Thanks!

@JetFault
Copy link
Contributor

@maksimr Is there a reason watcher doesn't use node-glob after https://github.com/karma-runner/karma/blob/master/lib/watcher.js#L23

@maksimr
Copy link
Contributor

maksimr commented Nov 21, 2014

@JetFault yup see comment

@JetFault
Copy link
Contributor

@maksimr Maybe use minimatch's implementation for brace expansion?

@maksimr
Copy link
Contributor

maksimr commented Nov 21, 2014

@JetFault maybe. Pull request are welcome :)
Thanks!

JetFault added a commit to JetFault/karma that referenced this issue Nov 24, 2014
Expands braces in watcher, so you can watch: ['a/{b,c}'] which would
expand to ['a/b', 'a/c']

Closes karma-runner#1249
JetFault added a commit to JetFault/karma that referenced this issue Nov 24, 2014
Expands braces in watcher, so you can watch: ['a/{b,c}'] which would
expand to ['a/b', 'a/c']

Closes karma-runner#1249
@maksimr
Copy link
Contributor

maksimr commented Nov 25, 2014

Fix in canary branch

@maksimr maksimr closed this as completed Nov 25, 2014
dignifiedquire pushed a commit that referenced this issue May 20, 2015
Expands braces in watcher, so you can watch: ['a/{b,c}'] which would
expand to ['a/b', 'a/c']

Closes #1249
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

Successfully merging a pull request may close this issue.

3 participants