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
cannot support multi version of go #1348
Comments
the workaround here would be to use |
Thanks for the reply. The workaround you suggest works but seems inconvenient(can't use
|
if you’re up for working on a PR I can pull it in. I’d propose defining an environment variable that the ginkgo CLI picks up on to set the name of the go binary. If the variable is not defined it should fall back to just Can you check and see if there’s a standardized name for such an env var within the go community? |
Great, have the same thought on the environment variable😄. Let me do some research and create a PR for this. |
I haven't found any tools that had |
give |
I use |
I use asdf to separate Go versions and have no problems, since asdf shares not only the Go library, but also downloadable and executable utilities |
Thanks you guys for all your advice. I had tried all that solutions(not thoroughly) you guys suggested and I found that asdf is the one that most suitable for my use-case. The reason is that asdf can manage golang version based on your projects config and I think that is the feature that gvm and gimme lack of(or maybe I had missed it in their usage). However, It is a pity that I found all of them not set the $GOPATH, $GOROOT and $GOBIN correctly, but I found this comment useful. Here is a snippet that set some go env var in my .zshrc based on asdf and asdf-direnv, I hope that it would be of some help for those who might need it. # put this in the .envrc in your project root
export GOPATH=$(asdf where golang)/packages
export GOROOT=$(asdf where golang)/go
export GOBIN=$(asdf where golang)/go/bin
export PATH="${PATH}:${GOBIN}"
use asdf
|
ginkgo version: v2.15.0
custom go version for my project: go1.21
default go version(system-wide): go1.19
Issue description: When I want to use go1.21 to build and test my project, I had encountered the following error:
Looks like this is because ginkgo can only use the default go command whose version is 1.19 for building although I use go1.21 for my project. I wonder there is any work around for this ?
The text was updated successfully, but these errors were encountered: