In several of my projects I use a configuration like this (and it works fine):
"options": [
"--proto_path=${workspaceRoot}/",
"--proto_path=`go list -m -f {{.Dir}} github.com/relab/gorums`",
"--go_out=proto/"
]
However, I'm trying to set up the same in an another project, but I cannot seem to get it to work. I get this error and the plugin show errors in the Problems pane:
`go list -m -f {{.Dir}} github.com/relab/gorums`: warning: directory does not exist. gorums.proto: File not found.
If I run the command go list -m -f {{.Dir}} github.com/relab/gorums in the terminal and copy the output, the errors go away and all is fine:
"options": [
"--proto_path=${workspaceRoot}/",
"--proto_path=/Users/meling/go/pkg/mod/github.com/relab/gorums@v0.7.1-0.20220307181651-94a8af8e467c",
"--go_out=proto/"
]
I've also tried with the $(shell ...) thing:
"options": [
"--proto_path=${workspaceRoot}/",
"--proto_path=$(shell go list -m -f {{.Dir}} github.com/relab/gorums)",
"--go_out=proto/"
]
Anyone know what could be the problem?
PS: The reason for using the command to populate the proto_path is so that I can commit the settings.json to git and allow other developers get this working out of the box.
In several of my projects I use a configuration like this (and it works fine):
However, I'm trying to set up the same in an another project, but I cannot seem to get it to work. I get this error and the plugin show errors in the Problems pane:
If I run the command
go list -m -f {{.Dir}} github.com/relab/gorumsin the terminal and copy the output, the errors go away and all is fine:I've also tried with the
$(shell ...)thing:Anyone know what could be the problem?
PS: The reason for using the command to populate the
proto_pathis so that I can commit thesettings.jsonto git and allow other developers get this working out of the box.