Open seanidzenga opened 8 years ago
Hmm that's weird.
Could you open the Sublime Console (View -> Show Console
) and paste here the output after using the package?
Sure thing, this is what I get:
WINDOW COMMAND ENABLED True
WINDOW COMMAND ENABLED True
WINDOW COMMAND ENABLED True
WINDOW COMMAND ENABLED True
WINDOW COMMAND ENABLED True
WINDOW COMMAND ENABLED False
Traceback (most recent call last):
File "/Users/seanidzenga/Library/Application Support/Sublime Text 3/Packages/Gulp/gulp.py", line 93, in list_tasks
json_result = self.fetch_json()
File "/Users/seanidzenga/Library/Application Support/Sublime Text 3/Packages/Gulp/gulp.py", line 125, in fetch_json
return self.write_to_cache()
File "/Users/seanidzenga/Library/Application Support/Sublime Text 3/Packages/Gulp/gulp.py", line 148, in write_to_cache
return self.fetch_json()
File "/Users/seanidzenga/Library/Application Support/Sublime Text 3/Packages/Gulp/gulp.py", line 130, in fetch_json
raise Exception("Sha1 from gulp cache ({0}) is not equal to calculated ({1}).\nTry erasing the cache and running Gulp again.".format(data[gulpfile]["sha1"], filesha1))
KeyError: '/Users/seanidzenga/Documents/workspace/PSBareBones/gulpfile.js'
error: Gulp: '/Users/seanidzenga/Documents/workspace/PSBareBones/gulpfile.js'
indexing [queue 2]: no files were indexed out of the 1 queued, abandoning crawl
Erasing .sublime-gulp.cache unfortunately doesn't solve it.
It's kind of weird that you can run arbitrary tasks but not the base Gulp
command. It seems that there is a problem writing the cache...
I'm shooting in the dark here but if you leave the following on your gulpfile.js
var gulp = require('gulp');
gulp.task('clean', function() {
});
And run Gulp
, does it work? if it doesn't what are the contents of .sublime-gulp.cache
?,
and, just in case, which gulp
version are you using ?
This is the .sublime-gulp.cache
file when I use my actual gulpfile:
{"/Users/seanidzenga/Documents/Workspace/PSBareBones/gulpfile.js":{"sha1":"ca0e936598b9bd647dd385a8212ec667eb5f3eb7","tasks":{"lint":{"name":"lint","dependencies":"lintToConsole lintToFile"},"lintToConsole":{"name":"lintToConsole","dependencies":""},"lintToFile":{"name":"lintToFile","dependencies":""},"js":{"name":"js","dependencies":""},"experimental":{"name":"experimental","dependencies":""},"sass":{"name":"sass","dependencies":""},"sassLint":{"name":"sassLint","dependencies":""},"watch":{"name":"watch","dependencies":""},"default":{"name":"default","dependencies":"lint sass watch"}}}}
This is what that file looks like when I replace the contents with the code you provided:
{"/Users/seanidzenga/Documents/Workspace/PSBareBones/gulpfile.js":{"sha1":"9083c04c106d31cb16093b2bc0f719c2940c5563","tasks":{"clean":{"name":"clean","dependencies":""}}}}
I didn't have to delete the .sublime-gulp.cache
file in order to get the second snippet, so the file is being written (no permission issues)
gulp -v
yields:
[10:05:47] CLI version 1.2.1
[10:05:47] Local version 3.9.1
Ok, the package seems to be doing everything right up until the point of reading the cache. I tried the same gulpfile
above in my computer and (not surprisingly) the sha1
is the same so the only thing I can think of right now is that there is a problem reading the cache. Are you using any Sublime Gulp
settings?
If you're up to it, you could do some tinkering of your own. If you open your Packages
folder in sublime (cmd + p
-> Browse Packages
) you'll see the Gulp/gulp.py
file.
You can add the following log to the line 116-117
:
print("Reading file %s got the json\n\t%s." % (jsonfilename, data))
print("The gulpfile path is %s" % gulpfile)
print("The computed sha is %s" % filesha1)
And
else:
print('File %s not found on the local filesystem' % jsonfilename)
on line 120
Both logs will be visible on the console
after running Gulp
and maybe will give us some more insight.
Thanks !
Running on Mac OSX, sublime text version 3103 with fix mac path installed as well
I've checked my gulpfile and even replaced it with a very simple gulp file that merely executes a console.log, if I run gulp from terminal things work perfectly, but for whatever reason sublime-gulp will show a dialog popup with the following:
gulp:'path-to-gulpfile-here/gulpfile.js'
and nothing else happens.
I can explicitly execute tasks by using the gulp: run arbitrary task command but it would be nice to see the list of gulp tasks.