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
We have noticed the client-gen failed to run sometimes in GitHub Action. After the investigation in mosn/htnn#687, we found that the GOROOT mismatching causes it.
The client-gen imports gengo, and gengo imports go/build. The go/build module will invoke the go toolchain to generate the go code. If the GOROOT is not given as the env var, go/build will use the builtin default GOROOT to look up the go toolchain.
This brings a problem when the client-gen is built with a go compiler A and then executed on a machine that has a go compiler B, the builtin GOROOT is different from the real GOROOT, causes fork/exec xxx/go: no such file or directory error.
To avoid such an error, we should notify the user to pass the GOROOT env when invoking the client-gen, so the environment to build client-gen doesn't impact the environment to use client-gen. For example, GOROOT=$(go env GOROOT) client-gen ....
The text was updated successfully, but these errors were encountered:
We have noticed the client-gen failed to run sometimes in GitHub Action. After the investigation in mosn/htnn#687, we found that the GOROOT mismatching causes it.
The client-gen imports gengo, and gengo imports
go/build
. Thego/build
module will invoke the go toolchain to generate the go code. If theGOROOT
is not given as the env var,go/build
will use the builtin default GOROOT to look up the go toolchain.This brings a problem when the client-gen is built with a go compiler A and then executed on a machine that has a go compiler B, the builtin GOROOT is different from the real GOROOT, causes
fork/exec xxx/go: no such file or directory
error.To avoid such an error, we should notify the user to pass the GOROOT env when invoking the client-gen, so the environment to build client-gen doesn't impact the environment to use client-gen. For example,
GOROOT=$(go env GOROOT) client-gen ...
.The text was updated successfully, but these errors were encountered: