grafana / xk6-amqp

A k6 extension for publishing and consuming messages from queues and exchanges using AMQP 0.9.1.
Apache License 2.0
25 stars 28 forks source link

k6 0.45.1 issue on build #34

Closed Laurianti closed 11 months ago

Laurianti commented 11 months ago

From 0.45.0 to 0.45.1 I have this issue:

2023/08/05 14:01:15 [INFO] Build environment ready
2023/08/05 14:01:15 [INFO] Building k6
2023/08/05 14:01:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2023/08/05 14:01:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /go/k6 -ldflags=-w -s -trimpath
# go.k6.io/k6/js/modules
/go/pkg/mod/go.k6.io/k6@v0.45.1/js/modules/resolution.go:161:20: source.URL.JoinPath undefined (type *url.URL has no field or method JoinPath)
note: module requires Go 1.19
2023/08/05 14:01:54 [INFO] Cleaning up temporary folder: /tmp/buildenv_2023-08-05-1400.2697366931
2023/08/05 14:01:54 [FATAL] exit status 2
The command '/bin/sh -c xk6 build --with github.com/grafana/xk6-amqp@latest' returned a non-zero code: 1
mstoykov commented 11 months ago

@Laurianti this error seems to indicate you are compiling with a version of go that is below 1.19.

The code referenced there wasn't update inv v0.45.1 - it was added for v0.45.0.

There is good chance that you never compiled with v0.45.0 as the update to it was tagged the day before the update to v0.45.1 was made.

Can you confirm your go version by running go version ?

Laurianti commented 11 months ago

You are right, I had Go version 1.18 installed, and that was indeed the issue. After updating to Go 1.19, the compilation worked correctly. Thank you!