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

Error on running the command #29

Open
nagulv opened this issue Oct 13, 2022 · 9 comments
Open

Error on running the command #29

nagulv opened this issue Oct 13, 2022 · 9 comments

Comments

@nagulv
Copy link

nagulv commented Oct 13, 2022

I get this error after installing the extension and running the command:
Command 'Protolint: Lint protobuf file' resulted in an error (command 'protolint.lint' not found)

I have protolint in the path and vscode-proto3 installed. On Windows 11.

@dschreij
Copy link

Same here! Running protolint in WSL2. protolint is accessible on the PATH, but it doesn't appear to be activated when editing a proto file

@jpreese
Copy link
Collaborator

jpreese commented Mar 16, 2023

Does it work outside of WSL? I can take a closer look at this later today

@dschreij
Copy link

Yes then it works nicely

@jpreese
Copy link
Collaborator

jpreese commented Mar 30, 2023

I just setup VSCode, vscode-proto3, vscode-protolint, and protolint on WSL and it was working for me. Did you install the WSL extension for VSCode?

Any additional screenshots could also be helpful. The error here seems like the command itself, protolint.lint is not being registered. If protolint itself could not be found, that would be a different error (https://github.com/plexsystems/vscode-protolint/blob/master/src/extension.ts#L13)

@jpreese
Copy link
Collaborator

jpreese commented Mar 31, 2023

c126859 fixes an issue where protolint.path was set, but was being ignored on startup. This would include not being able to register the protolint.lint command due to the early return.

I'm hoping it fixes the issue here as well, but I have doubts if this setting was not in use and your protolint binary was accessible on the path.

@dschreij
Copy link

dschreij commented Mar 31, 2023

Thanks for investigating:

Did you install the WSL extension for VSCode?

Yes. I doublechecked and it definitely isn't the local one.

Any additional screenshots could also be helpful.

I can certainly make those, but what would you like screnshots of? The only thing I see is a toast/notification at the bottom-right that command protolint.lint cannot be found.

If protolint itself could not be found, that would be a different error

Ok that's good to know. I installed protolint through the go install way, as it cannot be downloaded through standard Ubunty repositories (which is the distro I use in WSL). This causes it to be installed in my GOPATH, which is of course part of my regular path as well. I use ZSH as shell environment, and I noticed before that VSCode doesn't always pick it up correctly and still uses bash under the hood, for which the GOPATH is not part of the path. To test if this could be the problem, I symlinked the protolint binary on my gopath to /usr/bin (which is also on the PATH in bash), but still got this error.

@AlexCannonball
Copy link

Hello, I added #31 to address this issue via UX: invalid binary path now causes a warning with actions to fix the path.

@dschreij
Copy link

dschreij commented Apr 5, 2023

Thanks! Don't know what else you did, but it suddenly started working for me, without any other configuration! This is great.

@Jazzinghen
Copy link

c126859 fixes an issue where protolint.path was set, but was being ignored on startup. This would include not being able to register the protolint.lint command due to the early return.

I'm hoping it fixes the issue here as well, but I have doubts if this setting was not in use and your protolint binary was accessible on the path.

This seems to fix the issue but the 0.8.0 version does not include this commit. I've installed it manually by building it locally but I think there should be a 0.8.1 release :D

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

5 participants