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

Temporary files produced by WebStorm IDE crash Toaster in watch mode #57

Open
zslayton opened this issue Jan 10, 2013 · 6 comments
Open
Assignees

Comments

@zslayton
Copy link

My IDE seems to produce and then immediately delete temporary files at save time. Unfortunately, the appearance/disappearance of this unexpected file crashes Toaster even if I provide the file extension in my excludes array.

I've checked and there doesn't seem to be a way to configure WebStorm to prevent the file's creation like Vim allows.

I can save the toaster.coffee file without issue.

$ toaster -w
[18:32:16] Compiled /Users/z/testbed/ct/r/release/js/r.js
[18:32:21] Changed /Users/z/testbed/ct/r/toaster.coffee
[18:32:22] Compiled /Users/z/testbed/ct/r/release/js/r.js
[18:32:23] Changed /Users/z/testbed/ct/r/toaster.coffee
[18:32:24] Compiled /Users/z/testbed/ct/r/release/js/r.js

fs.js:524
return binding.stat(pathModule.makeLong(path));
^
Error: ENOENT, no such file or directory '/Users/z/testbed/ct/r/src/R/main.coffee___jb_bak
__'
at Object.fs.statSync (fs.js:524:18)
at DirWatcher.diff (/usr/local/share/npm/lib/node_modules/coffee-toaster/node_modules/fs-util/lib/fs-util.js:313:21)
at DirWatcher.onchange (/usr/local/share/npm/lib/node_modules/coffee-toaster/node_modules/fs-util/lib/fs-util.js:284:17)
at FSWatcher.__bind (/usr/local/share/npm/lib/node_modules/coffee-toaster/node_modules/fs-util/lib/fs-util.js:4:61)
at FSWatcher.EventEmitter.emit (events.js:99:17)
at FSEvent._handle.onchange (fs.js:826:12)

Toaster's great! I'm hoping I can use its watch feature. Thanks!

@zslayton
Copy link
Author

Turns out it is possible to disable temporary file creation in WebStorm:

  1. In the [IDE Settings] section of the [Settings] dialog box, click [General].
  2. Uncheck the [Use "safe write"] check box.

Now I'm able to use the 'watch' command. It'd still be nice to be able to exclude these files, but I'm happy to have a fix in the meantime.

@ghost ghost assigned arboleya Jan 14, 2013
@arboleya
Copy link
Owner

Hi @portmanteaufu, sorry for the delay.

Are you using the last version? toaster -v

As I can see the WebStorm creates the backup file with the .coffee___jb_bak___ extension. Is that right?

Please copy'n'paste your toaster.coffee here, it should have worked as far as I'm concerned.

@zslayton
Copy link
Author

No trouble! I'm on version 0.6.11. My toaster.coffee is below. I tried a variety of exclude patterns, but didn't seem to have any luck. This one is just the latest.

# => SRC FOLDER
toast 'src'

# EXCLUDED FOLDERS (optional)
# exclude: ['folder/to/exclude', 'another/folder/to/exclude', ... ]
exclude: ['___jb_bak___']

# => VENDORS (optional)
vendors: ['vendor/Detect.js']

# => OPTIONS (optional, default values listed)
#bare: false
#bare: true
# packaging: true
# expose: ''
expose: 'window'
# minify: true
minify: false

# => HTTPFOLDER (optional), RELEASE / DEBUG (required)
httpfolder: '/r/js/r.js'
release: 'r/js/r.js'
debug: 'r/js/r-debug.js'

@arboleya
Copy link
Owner

Ok, thank you for reporting. Many people have posted problems with that, I'm making a huge refactor in Toaster, so I'll certainly investigate this reasons a little better.

@arboleya
Copy link
Owner

@portmanteaufu Hi, can you confirm if this issue is still happening with the latest version (0.6.12)? -- this version is set to work only with node v0.10.x.

I don't have the WebStorm IDE but I had simulated this behavior and the file ending with .coffee___jb_bak___ is currently being ignored in Toaster. Actually, anything that doesn't ends with .coffee is ignored.

@arboleya
Copy link
Owner

@portmanteaufu Hi, I just want to tell you that I'm discontinuing Toaster in favor of it's new fork named Polvo.

More info here:

https://github.com/serpentem/coffee-toaster
https://github.com/serpentem/coffee-toaster/wiki

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

2 participants