-
Notifications
You must be signed in to change notification settings - Fork 55
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
Ubuntu snap install of zig fails to format #34
Comments
I took some time to debug the extension to find out why.
I tried to find a way to evaluate symlinks and couldn't find a proper way to do it cleanly (in a single line of code). As an alternative solution, for the time being, you can set |
I am not able to reproduce this issue. I have It might be specific to a version of VSCode or Zig. I am using vscode 1.50.1 and zig 0.6.0. Also, I am using the git version of the extension, not the packaged one. |
Same error for asdf installed zig on macos. Manually running zig fmt on the files from vscode integrated terminal works. |
I don't think this is caused by symlinks since I have |
Did you download it with the package manager or did you compile it yourself? |
There is an option to use |
I was not able to reproduce this by installing snap and Zig with it. Closing unless someone can confirm that this is still an issue. |
i just face same issues now |
firstly i install zig from snap stable branch |
Well, I don't think the problem comes from using a symlink in and of itself. However, it may very well come from what the symlink target actually is. When using All this to say that in the case of snap installed zig, |
That still wouldn't explain the issue assuming that running |
Alright, new guess, it might be due to apparmor (or its configuration as it pertains to snaps), which would mean the problem wouldn't show up on a system without apparmor (or with a better apparmor configuration regarding snaps). And yeah, I can confirm that both Anyway, here's the final part (starting from the last
Which is what gave me the idea that it might be apparmor at work: Both the Unfortunately, I'm not proficient with apparmor, so I have no idea how to investigate further or how to read and understand the apparmor configuration (the config file pertaining to snaps is a humongous jumble of stuff that goes over my head). |
When I try to save my Zig files and have code auto formatted, it fails. My workaround at the moment is to not use the 'snap' version of Zig.
Whenever I save Zig code, this error output is generated and the file is not formatted.
My setup:
If I download Zig and run it from my home directory, it works as expected (and this is my workaround):
The text was updated successfully, but these errors were encountered: