Skip to content
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

Fix Crystal build #60

Merged
merged 5 commits into from
Jan 21, 2019

Conversation

vladfaust
Copy link
Contributor

@vladfaust vladfaust commented Jan 20, 2019

It now successfully builds a file with Sublime builds feature (found at Tools -> Build).

Reference: https://www.sublimetext.com/docs/3/build_systems.html

Can't even find docs for "shell".

It now successfuly builds a file with Sublime builds feature (found at Tools -> Build)
@vladfaust
Copy link
Contributor Author

vladfaust commented Jan 20, 2019

Working nicely! It only highlights the first output entry, which should be enough in most cases.

Unfortunately, crystal run does not print column numbers with text formatting. And json formatting doesn't work well with Sublime Builds when having multiple errors in the output (probably related to the lack of \n in the JSON output).

image

FYI, there are results of my experiments with the JSON output (should be escaped to use as a JSON value):

  • "file_regex": ^\[{"file":"(?<filename>[\w\/]+.cr)","line":(?<line_number>\d+),"column":(?<column_number>\d+),"size":\d+,"message":"(?<message>[\w\s'#():]+)"}
  • "line_regex": {"file":"(?:[\w\/]+.cr)","line":(?<line_number>\d+),"column":(?<column_number>\d+),"size":\d+,"message":"(?<message>[\w\s'#():]+)"}

Copy link
Member

@faustinoaq faustinoaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@vladfaust vladfaust merged commit 389e90b into crystal-lang-tools:master Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants