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
Builds of k6 created manually via go get -u github.com/loadimpact/k6 or go build -a github.com/loadimpact/k6 refuse to run on other machines that don't have the k6 code checked out exactly where it was on the build machine. That's the error:
panic: could not locate box "lib"
goroutine 1 [running]:
github.com/loadimpact/k6/vendor/github.com/GeertJohan/go%2erice.MustFindBox(0xc331c9, 0x3, 0x8deabf)
/go/path/on/system/src/github.com/loadimpact/k6/vendor/github.com/GeertJohan/go.rice/box.go:110 +0x97
Even the following is enough to reproduce the issue:
go get -u github.com/loadimpact/k6
"$GOPATH/bin/k6"# this runs without issues
mv "$GOPATH/src/github.com/loadimpact/k6""$GOPATH/src/github.com/loadimpact/k6-moved""$GOPATH/bin/k6"# this fails
Looks like some of the static resources are not properly embedded...
Reported by vtanakas on slack
The text was updated successfully, but these errors were encountered:
Turns out that this is working as intended at the moment, but we'll still try and "fix" (i.e. improve) it in the next release.
At the moment k6 works when directly built from source with goget/build/install only when executed on the same machine, since it tries to load the JavaScript libraries it uses from their folders in the git repo. Building fully portable binaries is currently done with the build-release.sh script, which first builds the executable files and then uses go.rice to bundle the static resources in them.
This mostly works, but it's far from optimal. For sure it breaks Go developers' expectations how Go applications should be built. Therefore for the next release we'll shift the burden of bundling the JS libraries to the maintainers (probably via go generate, the other go.rice mode and CI checks) and make the simple goget/build/install builds fully portable by default.
Builds of
k6
created manually viago get -u github.com/loadimpact/k6
orgo build -a github.com/loadimpact/k6
refuse to run on other machines that don't have the k6 code checked out exactly where it was on the build machine. That's the error:Even the following is enough to reproduce the issue:
Looks like some of the static resources are not properly embedded...
Reported by vtanakas on slack
The text was updated successfully, but these errors were encountered: