-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler fixes #4215
Compiler fixes #4215
Conversation
Added:
|
tools/grammars/compiler/converter.go
Outdated
@@ -248,13 +257,25 @@ func (conv *Converter) Report() error { | |||
return nil | |||
} | |||
|
|||
var VERSION_RE *regexp.Regexp = regexp.MustCompile("VERSION = \"(.+)\"") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a little cleaner to change version.rb
to do VERSION = File.read("#{__dir__}/VERSION")
to simplify this, but this is clever and works 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer your suggestion 100%. Thank you!
It's actually 6.4.0, but I'm making a follow-up commit to bump "back" up to 6.3.9 so we have a single commit bumping the new version file usable as example in CONTRIBUTING.md. It makes sense, I swear.
@@ -1,3 +1,3 @@ | |||
module Linguist | |||
VERSION = "6.4.0" | |||
VERSION = File.read(File.expand_path("../VERSION", __FILE__)).strip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. One less hack for the release script I've been slowly working on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
Some fixes for the grammar compiler:
-linguist-path
wasn't being usedballerina.monarch.json
) — these were being written to.json
in the output directory, which will in turn crash prettylights when it tries to read.json
from the grammar directory and can't find ascopeName
in it./cc @vmg