sublime-zig-language icon indicating copy to clipboard operation
sublime-zig-language copied to clipboard

Zig.py: fix result_file_regex

Open travisstaloch opened this issue 3 years ago • 6 comments

  • make leading '.' optional
  • before this, a leading '.' was required by this regex. this made parsing of all error messages fail which don't have a leading '.'. as a result, i had never been able to see the build system's inline error messages.
  • tested with zig version 0.10.0-dev.3838+77f31ebbb (Aug 31 2022) with sublime text 4126 on linux

travisstaloch avatar Sep 02 '22 03:09 travisstaloch

addresses, maybe closes #59

travisstaloch avatar Sep 02 '22 03:09 travisstaloch

Would this fix jumping to errors? This often doesn't work for me. Then this seems like an important improvement.

marijnfs avatar Feb 16 '23 23:02 marijnfs

Yes, this patch allows Zig.py to parse the paths in zig error messages which don't have a leading '.'.

Here is an example:

$ zig version
0.11.0-dev.1635+d09e39aef

$ zig build
src/lib.zig:428:5: error: use of undeclared identifier # ... omitted rest of message

and here is an example using 0.9.1. Note the leading dot in the path:

$ zig version
0.9.1

$ zig build
./build.zig:3:21: error: container 'std' has no member called 'Build'
pub fn build(b: *std.Build) void {

travisstaloch avatar Feb 17 '23 02:02 travisstaloch

Zig.py is not even needed. Here is how I build my zig projects. In the .sublime-project I have the following entry:

	"build_systems": [
    	{
    	  "name": "zig test",
        "cmd": ["zig", "build", "test"],
        "file_regex": "(.*):(\\d+):(\\d+): (.*)",
        "working_dir": "${folder}"
      },

@emekoi could you add another owner to this repository ? You've done a great job in the past to bootstrap this up, but you haven't been very active in the past, and I think it's becoming a blocker for this tool. Thanks for you previous work, there is many reason why you might want to do something else with your free time. I've been there too, nothing personal.

I volunteer myself to maintain this repo. I have maintained other Sublime packages in the past.

Note: I have reworded this post, the previous version was a bit too dry, sorry about that.

gwenzek avatar Feb 18 '23 09:02 gwenzek

vote for you @gwenzek maintain this plugin. #67 works nice

zekexiao avatar Feb 18 '23 13:02 zekexiao

How can we make this work? For now I'm keeping my own fork where I pull all your changes into master, so I can easily add it to the SublimeText package manager.

marijnfs avatar Mar 05 '23 21:03 marijnfs