ziglang / sublime-zig-language

Zig language support for Sublime Text
MIT License
85 stars 25 forks source link

Zig.py: fix result_file_regex #66

Open travisstaloch opened 2 years ago

travisstaloch commented 2 years ago
travisstaloch commented 2 years ago

addresses, maybe closes #59

marijnfs commented 1 year ago

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

travisstaloch commented 1 year ago

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 {
gwenzek commented 1 year ago

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.

zekexiao commented 1 year ago

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

marijnfs commented 1 year ago

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.