apm
apm copied to clipboard
Silent conversion failure for gn_sublime .tmLanguage package
apm init --verbose --package language-gn --convert https://github.com/eseidelGoogle/gn_sublime
The package seems to be a valid .tmLanguage: https://github.com/eseidelGoogle/gn_sublime
But the converter fails silently. It produces a new atom package, but doesn't have any part of the gn grammar in it.
I'm happy to debug if someone has some pointers. I haven't found a way to get init to log anything.
Reading the code: https://github.com/atom/apm/blob/master/src/package-converter.coffee
It looks like it's looking for .tmLanguage files inside a Syntaxes directory (which this package doesn't have). It's possible that I formatted my sublime bundle in a way that is valid for Sublime but not for the atom converter.
It still would be nice if init at least printed a warning when the converter failed to find anything to convert. :)
Also ran into something like this when attempting to convert a .tmLanguage file instead of a .tmBundle file.
So did I.
IMHO, the detection of .tmLanguage files should be less strict. While it's true that TextMate expects language definitions in /Syntaxes, Sublime Text – which supports TextMate grammar – will load these from anywhere in the package. So the conversion process only has TextMate in mind, but not Sublime Text. I believe there are more packages for Sublime Text than for TextMate, so different locations for .tmLanguage file should be considered.