sublime_autotools icon indicating copy to clipboard operation
sublime_autotools copied to clipboard

Autoconf: fix references to external rules

Open pchaigno opened this issue 6 years ago • 3 comments

While trying to use the Autoconf grammar in Linguist (turns out we can't use it after all since it's GPL v3), our compiler detected that some of the includes have broken references to external rules. This pull request fixes it.

pchaigno avatar Nov 07 '19 14:11 pchaigno

Thanks for the contribution! I'm a bit mystified though, you are correct that the current references are broken, I see a lot of errors in the Sublime Text console like this:

Error loading scope:source.shell.comment: Unable to find syntax file for scope source.shell.comment in Packages/Autotools/Autoconf.tmLanguage
Error loading scope:source.shell.case-clause: Unable to find syntax file for scope source.shell.case-clause in Packages/Autotools/Autoconf.tmLanguage

However, the change in this pull request seems not to work correctly either, but in a different way:

no such context scope:source.shell#comment in Packages/Autotools/Autoconf.tmLanguage
no such context scope:source.shell#case-clause in Packages/Autotools/Autoconf.tmLanguage

Do you know why this might be happening?

ptomato avatar Nov 08 '19 05:11 ptomato

I'm guessing this is happening because no grammar with the scope source.shell has been imported in the environment where you're loading the present grammar. Or that grammar doesn't have rules comment and case-clause.

/cc @Alhadis might know more.

pchaigno avatar Nov 08 '19 08:11 pchaigno

@ptomato It sounds like you're attempting to reference another grammar's rule which doesn't exist. Check the source.shell grammar and verify the repository object defines the keys comment and case-clause.

Alhadis avatar Nov 09 '19 00:11 Alhadis