You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like gexec.Build assumes a GOPATH - which is not necessarily true in this strange new world of go modules. I want to submit a PR to add support for building such projects however I'm a little stuck on the API.
What would you think of gexec.BuildMod(dir, path string, args ...string) (string, er) where path is just the path off the project being build (not relative to a GOPATH).
In order to build a binary using go modules I need to be:
in the same dir as my go.mod
GOPATHless
gexec.BuildMod("garden-runc-release/src/grootfs", "cmd/tardis", "-mod", "vendor") would do something analogous to:
$ cd garden-runc-release/src/grootfs
$ go build -mod vendor -o {some_temp_dir}/tardis cmd/tardis
The text was updated successfully, but these errors were encountered:
Passing the code.cloudfoundry.org path doesn't work with go mod and
`gexec.Build`. This is a [known
limitation](onsi/gomega#340) with Gomega.
Co-authored-by: Tom Viehman <[email protected]>
Co-authored-by: Weyman Fung <[email protected]>
tjvman
added a commit
to cloudfoundry/tps
that referenced
this issue
Jul 21, 2021
Locket cannot be built when go modules are enabled. As a temporary
solution while the locket maintainers update to use modules, the tests
now expect the locket binary to be built independently and made
available on the $PATH.
Also, passing the code.cloudfoundry.org path when building tps-watcher doesn't
work with go mod and `gexec.Build`. This is a [known
limitation](onsi/gomega#340) with Gomega.
Co-authored-by: Tom Viehman <[email protected]>
Co-authored-by: Weyman Fung <[email protected]>
Hey friends.
Looks like
gexec.Build
assumes aGOPATH
- which is not necessarily true in this strange new world of go modules. I want to submit a PR to add support for building such projects however I'm a little stuck on the API.What would you think of
gexec.BuildMod(dir, path string, args ...string) (string, er)
where path is just the path off the project being build (not relative to aGOPATH
).In order to build a binary using go modules I need to be:
go.mod
GOPATH
lessgexec.BuildMod("garden-runc-release/src/grootfs", "cmd/tardis", "-mod", "vendor")
would do something analogous to:$ cd garden-runc-release/src/grootfs $ go build -mod vendor -o {some_temp_dir}/tardis cmd/tardis
The text was updated successfully, but these errors were encountered: