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

sass "Compilation succeeded" notification displayed three times instead one #153

Closed
Leolik opened this issue Oct 23, 2013 · 10 comments
Closed

Comments

@Leolik
Copy link

Leolik commented Oct 23, 2013

I used guard for sass and compass. (Ubuntu 13.04, amd64)

Then I used guard with 'listen' version <= 2.0.1, after saving 'sass' file I get one notification in console and in notify-osd. It's was correct. http://goo.gl/Ak9ydK
But then I updated 'listen' to >= 2.0.2, I start get 3 notification (sometimes 5) in console and in notify-osd. http://goo.gl/vUTdy2
I think it's a problem, I can't determine have I errors in styles or not, because notify-osd displayed notification more and more after each file save.

Sorry for my English.

@thibaudgg
Copy link
Member

Notifications are handled by Guard not Listen, have you the last version of Guard?

@Leolik
Copy link
Author

Leolik commented Oct 23, 2013

I thought it's a guard bug too, but when I checked different versions guard and listen, and I see, bug reproduced at the moment, when used 'listen' => 2.0.2

guard 2.0.5 + listen 2.0.0 = not reproduced
guard 2.0.5 + listen 2.0.1 = not reproduced
guard 2.0.5 + listen 2.0.2 = reproduced
...
guard 2.2.1 + listen 2.1.1 = reproduced

@thibaudgg
Copy link
Member

From 2.0.2 Listen is more strict with ignored directories (https://github.com/guard/listen/releases/tag/v2.0.2) maybe you have some directories that were ignored before the release. Could you share your folders tree structure?

@Leolik
Copy link
Author

Leolik commented Oct 23, 2013

You can see structure here https://bitbucket.org/leolik/my_nanoc_default/src

@thibaudgg
Copy link
Member

Mmm that's really weird, all seems fine in your structure. @guard/core-team do you think it's more an issue with Guard? I don't see where the problem could be on Listen.

@rymai
Copy link
Member

rymai commented Oct 23, 2013

@Leolik Could you run Guard in debug mode (bundle exec guard -d) and show us the output?

Also, what happens if you fire a change manually on a file (type change <path to a file> in Guard's interactor)?

Last but bot least, what code editor are you using?

@Leolik
Copy link
Author

Leolik commented Oct 24, 2013

  1. bundle exec guard -d (and after saving style.scss)
$ bundle exec guard -d
09:33:34 - DEBUG - Command execution: which notify-send
09:33:34 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
09:33:34 - INFO - Guard is using NotifySend to send notifications.
09:33:34 - INFO - Guard is using TerminalTitle to send notifications.
09:33:34 - DEBUG - Command execution: hash stty
09:33:35 - DEBUG - Guard starts all plugins
09:33:35 - DEBUG - Hook :start_begin executed for Guard::Nanoc
      create  [0.15s]  output/index.html
      create  [0.21s]  output/css/style.css
09:33:35 - DEBUG - Command execution: notify-send NotifySend Compilation succeeded -t 3000 -h int:transient:1 -i /var/lib/gems/1.9.1/gems/guard-2.2.1/images/success.png -u low

09:33:35 - INFO - Compilation succeeded.
09:33:35 - DEBUG - Hook :start_end executed for Guard::Nanoc
09:33:35 - DEBUG - Hook :start_begin executed for Guard::LiveReload
09:33:35 - INFO - LiveReload is waiting for a browser to connect.
09:33:35 - DEBUG - Hook :start_end executed for Guard::LiveReload
09:33:35 - INFO - Guard is now watching at '/home/leolik/Projects/my/my_nanoc_default/slice'
09:33:36 - DEBUG - Start interactor
09:34:16 - DEBUG - Stop interactor
09:34:16 - DEBUG - Trying to run Guard::Nanoc#run_on_modifications with ["content/scss/.sublbfc.tmp"]
09:34:16 - DEBUG - Hook :run_on_changes_begin executed for Guard::Nanoc
09:34:17 - DEBUG - Command execution: notify-send NotifySend Compilation succeeded -t 3000 -h int:transient:1 -i /var/lib/gems/1.9.1/gems/guard-2.2.1/images/success.png -u low

09:34:17 - INFO - Compilation succeeded.
09:34:17 - DEBUG - Hook :run_on_changes_end executed for Guard::Nanoc
09:34:17 - DEBUG - Trying to run Guard::Nanoc#run_on_additions with ["content/scss/style.scss", "content/scss/.sublbfc.tmp"]
09:34:17 - DEBUG - Hook :run_on_changes_begin executed for Guard::Nanoc
09:34:17 - DEBUG - Command execution: notify-send NotifySend Compilation succeeded -t 3000 -h int:transient:1 -i /var/lib/gems/1.9.1/gems/guard-2.2.1/images/success.png -u low

09:34:17 - INFO - Compilation succeeded.
09:34:17 - DEBUG - Hook :run_on_changes_end executed for Guard::Nanoc
09:34:17 - DEBUG - Hook :run_on_removals_begin executed for Guard::Nanoc
09:34:17 - DEBUG - Command execution: notify-send NotifySend Compilation succeeded -t 3000 -h int:transient:1 -i /var/lib/gems/1.9.1/gems/guard-2.2.1/images/success.png -u low

09:34:17 - INFO - Compilation succeeded.
09:34:17 - DEBUG - Hook :run_on_removals_end executed for Guard::Nanoc
09:34:17 - DEBUG - Start interactor
  1. change 'path to a file'
guard(main)> change content/scss/style.scss
09:37:49 - DEBUG - Trying to run Guard::Nanoc#run_on_modifications with ["content/scss/style.scss"]
09:37:49 - DEBUG - Hook :run_on_changes_begin executed for Guard::Nanoc
09:37:49 - DEBUG - Command execution: notify-send NotifySend Compilation succeeded -t 3000 -h int:transient:1 -i /var/lib/gems/1.9.1/gems/guard-2.2.1/images/success.png -u low

09:37:49 - INFO - Compilation succeeded.
09:37:49 - DEBUG - Hook :run_on_changes_end executed for Guard::Nanoc
  1. Code editor - Sublime Text 3

As I see, problem with sublime temp files?

@thibaudgg
Copy link
Member

Ok @rymai nailed it, this is coming from modification on .tmp files that are now catched.

Please try to add ignore: /\.tmp$/ at the top of your Guardfile to fix it, if it works I'll ignore .tmp extension by default.

@Leolik
Copy link
Author

Leolik commented Oct 24, 2013

Yes, if I add ignore /\.tmp$/ all works fine

@thibaudgg
Copy link
Member

Thanks 2.1.2 released!

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

3 participants