Linguist: Issue with some grammars

Created on 21 Jun 2016  路  6Comments  路  Source: github/linguist

There are a few grammars that I can't update because we fail to detect any scopes:

vendor/grammars/NSIS
vendor/grammars/sourcepawn
vendor/grammars/awk-sublime

To be honest I've not had a chance to figure out what's going on here but we get errors like this when running the tests (with the updated grammars):

3) Failure:
TestGrammars#test_local_scopes_are_in_sync [/Users/arfon/github/linguist/test/test_grammars.rb:70]:
The scopes listed for vendor/grammars/awk-sublime in grammars.yml don't match the scopes found in that repository.
Expected: ["source.awk"]
Actual: nil

This isn't a huge issue right now, except that we can't update grammars that throw errors like this. It's also a pain when trying to run git submodule update --remote as part of the release process for Linguist.

If anyone fancies trying to debug this then please be my guest. Otherwise I'll try and get to this at some point.

Bug

Most helpful comment

My intended procedure:

  • git submodule update --remote
  • bundle exec rake
  • STUFF HAPPENS
  • ?????
  • Resolve issue

I'll keep you posted, sir.

All 6 comments

I'll have a look once I've finished posting a googolplex of orders at Discogs... (my streak this week is so empty, hahaha)

I'll have a look once I've finished posting a googolplex of orders at Discogs... (my streak this week is so empty, hahaha)

Awesome. Thanks!

Steps to replicate:

  • git submodule update --remote
  • bundle exec rake
  • giphy

My intended procedure:

  • git submodule update --remote
  • bundle exec rake
  • STUFF HAPPENS
  • ?????
  • Resolve issue

I'll keep you posted, sir.

3079 fixes the issue for both vendor/grammars/NSIS and vendor/grammars/awk-sublime.

The issue for vendor/grammars/sourcepawn seems to be a bit different. The author removed the grammar file and there doesn't seem to be a direct replacement (maybe the files in snippets but I can't find an entrypoint :/). I opened an issue at austinwagner/sublime-sourcepawn#10.

鈽濓笍 Damn this guy stealing my thunder before I had a chance to investigate. :(

Okay, yeah, it seems like the author only intended for that repo to provide SourcePawn _completions_, as opposed to everything else that usually comes with a language-support package:

Sublime SourcePawn Completions
A Sublime Text 2 plugin that dynamically genenerates completions for SourcePawn.

And then a commit titled this:

Clean up a bunch of junk that ended up in here

Which removed the syntax definition file.

鈽濓笍 Damn this guy stealing my thunder before I had a chance to investigate. :(

Sorry :bow:
There's still work to be done if the author doesn't add the grammar back though :smiley:
In that case we could add it back ourselves in another repository since it was under MIT license.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sanchez3 picture Sanchez3  路  4Comments

haskellcamargo picture haskellcamargo  路  3Comments

d4nyll picture d4nyll  路  3Comments

Haroenv picture Haroenv  路  4Comments

TimothyGu picture TimothyGu  路  5Comments