-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Protobuf imports not resolved outside of the current buffer's directory #1453
Comments
Thanks, great report. Could you show what a valid command line invocation would look like? There's a secondary issue here, which is that our patterns are incomplete. You shouldn't get a bad error like this (instead, you should get an error on line one complaining about the failed import). |
Let me first link to the documentation around the
So based on this, from the above example, if I'm compiling
Hope this helps. Happy to provide more info if needed. |
Our project has a pretty complex set of protobuf models that requires compilation with multiple |
@drielsma Thanks for the feedback. I'm OK with adding support for a list of proto_path arguments. I also think the current one (passing the current directory) can be removed, right? Since the compiler runs from that directory. Looping in @marsam (hi!) since he wrote the original checker. @drielsma, would you like to write a patch? The new argument would work just like |
It seems use uber/prototool's lint command could solve this issue POC Impl (flycheck-define-checker protobuf-prototool
:command ("prototool" "lint"
(eval (expand-file-name (buffer-file-name)))
)
:error-patterns
((error line-start (file-name) ":" line ":" column
":" (message) line-end))
:modes protobuf-mode
:predicate (lambda () (buffer-file-name))) |
I'm using flycheck as a syntax checker for
protobuf
files. Within an example protobuf file at pathproto/path/to/foo.proto
, I have the following import line:This import line gives the following error message:
I suspect that because the import file isn't present in the buffer's directory, the path isn't being included in the
proto_path
argument here:flycheck/flycheck.el
Line 8606 in 1eecec8
Is it possible to configure flycheck to add extra
--proto_path
arguments to the compiler to help resolve this error?Answers
M-x flycheck-verify-setup
M-x emacs-version
M-x flycheck-version
The text was updated successfully, but these errors were encountered: