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

Zig.py: fix result_file_regex #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

travisstaloch
Copy link

@travisstaloch travisstaloch commented Sep 2, 2022

  • 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

- make leading '.' optional
- before this, a leading '.' was required by this regex. this made parsing
  of error 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)
@travisstaloch
Copy link
Author

addresses, maybe closes #59

@marijnfs
Copy link

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

@travisstaloch
Copy link
Author

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
Copy link
Contributor

gwenzek commented Feb 18, 2023

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
Copy link

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

@marijnfs
Copy link

marijnfs commented Mar 5, 2023

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.

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

Successfully merging this pull request may close these issues.

4 participants