Closed jsclifford closed 1 year ago
it doesn't build with k6 version >= v0.33.0 even with only one xk6-mock
Command: xk6 build v0.33.0 --with github.com/szkiba/xk6-mock
2022/10/04 19:12:48 [INFO] Temporary folder: /Users/antonparaskiv/GolandProjects/shipment-ext/buildenv_2022-10-04-1912.4138967645
2022/10/04 19:12:48 [INFO] Initializing Go module
2022/10/04 19:12:48 [INFO] exec (timeout=10s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod init k6
go: creating new go.mod: module k6
2022/10/04 19:12:48 [INFO] Pinning versions
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod edit -require github.com/szkiba/xk6-mock@latest
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod tidy -compat=1.17
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod tidy -compat=1.17
2022/10/04 19:12:48 [INFO] Writing main module: /Users/antonparaskiv/GolandProjects/shipment-ext/buildenv_2022-10-04-1912.4138967645/main.go
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod edit -require go.k6.io/k6@v0.33.0
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod tidy -compat=1.17
2022/10/04 19:12:48 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod tidy -compat=1.17
2022/10/04 19:12:49 [INFO] Build environment ready
2022/10/04 19:12:49 [INFO] Building k6
2022/10/04 19:12:49 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go mod tidy -compat=1.17
2022/10/04 19:12:49 [INFO] exec (timeout=0s): /Users/antonparaskiv/sdk/go1.17.13/bin/go build -o /Users/antonparaskiv/GolandProjects/shipment-ext/k6 -ldflags -w -s -trimpath
# github.com/szkiba/xk6-mock
../../../go/pkg/mod/github.com/szkiba/xk6-mock@v0.1.2/http.go:36:15: undefined: "go.k6.io/k6/js/modules/k6/http".ToURL
../../../go/pkg/mod/github.com/szkiba/xk6-mock@v0.1.2/http.go:41:10: cannot assign error to err in multiple assignment
../../../go/pkg/mod/github.com/szkiba/xk6-mock@v0.1.2/http.go:51:12: cannot assign httpext.URL to orig in multiple assignment
../../../go/pkg/mod/github.com/szkiba/xk6-mock@v0.1.2/http.go:51:12: cannot assign error to err in multiple assignment
2022/10/04 19:12:49 [INFO] Cleaning up temporary folder: /Users/antonparaskiv/GolandProjects/shipment-ext/buildenv_2022-10-04-1912.4138967645
2022/10/04 19:12:49 [FATAL] exit status 2
but it's ok for k6 version v0.32.0
xk6 build v0.32.0 --with github.com/szkiba/xk6-mock
other extensions may require newer version of k6
Thank you for feedback. It's fixed now, version v0.2.0 (the minimum k6 version is v0.43.0)
fixed in v0.2.0
Getting error every time when building xk6-mock with https://github.com/grafana/xk6-output-influxdb. Wondering if this can be adjusted to work together as I am trying to upgrade to influxdb-v2 and have mocking as well.
Command:
xk6 build v0.38.3 --with github.com/grafana/xk6-output-influxdb@latest --with github.com/szkiba/xk6-mock@latest
Go Version: 1.17.11 xk6 Version: latest OS: WSL2 on Windows 10