apm icon indicating copy to clipboard operation
apm copied to clipboard

Silent conversion failure for gn_sublime .tmLanguage package

Open eseidelGoogle opened this issue 10 years ago • 4 comments
trafficstars

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.

eseidelGoogle avatar Aug 13 '15 19:08 eseidelGoogle

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. :)

eseidelGoogle avatar Aug 13 '15 20:08 eseidelGoogle

Also ran into something like this when attempting to convert a .tmLanguage file instead of a .tmBundle file.

samuela avatar May 11 '16 21:05 samuela

So did I.

tobiasvl avatar Nov 28 '17 21:11 tobiasvl

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.

idleberg avatar Apr 11 '20 09:04 idleberg