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

Build system missing file regex #59

Open
gonzus opened this issue Dec 10, 2021 · 4 comments
Open

Build system missing file regex #59

gonzus opened this issue Dec 10, 2021 · 4 comments

Comments

@gonzus
Copy link

gonzus commented Dec 10, 2021

If you add this after the "selector": "source.zig", line, Sublime 4 is capable of parsing each of the errors and jumping to the line containing it:

"file_regex": "^\\s*([^:]+):(\\d+):(\\d+):\\s*(.*)$",
@rudedogg
Copy link

rudedogg commented Dec 16, 2021

I wish I had seen this, I fumbled through making the regex myself.

This is a really nice change though, it's very helpful.

Another good one:
"syntax": "Packages/Zig Language/Syntaxes/Zig.tmLanguage"
so the console output has zig syntax highlighting. Some of it is nonsense, but the code around errors is nice to have highlighted IMO.

image

@rudedogg
Copy link

It looks like it used to have "file_regex" but it was replaced:
815cffa#diff-842da002f0f59f63191c5af5fdc660929b936434bcebbf41d587a9f07dfda017L5

The changes seem based on the Sublime Documentation from here: https://www.sublimetext.com/docs/build_systems.html

That page is the only place I can find a reference to result_file_regex, so I'm wondering if the variable was renamed to file_regex, and that is what is causing this to not work.

@emekoi
Copy link
Contributor

emekoi commented Dec 18, 2021

which version of sublime text are you using? in previous versions of sublime text they were called file_regex and line_regex, but they were changed to result_file_regex and result_line_regex. in build sublime text build 4121, the old options don't work but the result versions do.

the newer result versions should also enable inline errors via phantoms, are they not showing up for you?

and lastly, for what type of builds is it not working for? on zig version 0.8.1, zig fmt and zig run output file paths differently, and the regex wasn't correctly handling that.

@emekoi
Copy link
Contributor

emekoi commented Dec 18, 2021

if possible could you open the console run sublime.log_result_regex(True) and then manually perform a build (other than a format) and then paste the output from the console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants