Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Conversation

imiric
Copy link
Contributor

@imiric imiric commented Jan 24, 2022

This fixes a strange build error since the release of k6 v0.36.0 (I'm using Go v1.17.3):

$ xk6 build --with github.com/grafana/xk6-browser=.                                                                                                                                        <<<
2022/01/24 12:08:13 [INFO] Temporary folder: /tmp/buildenv_2022-01-24-1208.2570827279
2022/01/24 12:08:13 [INFO] Writing main module: /tmp/buildenv_2022-01-24-1208.2570827279/main.go
2022/01/24 12:08:13 [INFO] Initializing Go module
2022/01/24 12:08:13 [INFO] exec (timeout=10s): /home/ivan/.local/go/bin/go mod init k6
go: creating new go.mod: module k6
go: to add module requirements and sums:
        go mod tidy
2022/01/24 12:08:13 [INFO] Replace github.com/grafana/xk6-browser => /home/ivan/Projects/grafana/xk6-browser
2022/01/24 12:08:13 [INFO] exec (timeout=10s): /home/ivan/.local/go/bin/go mod edit -replace github.com/grafana/xk6-browser=/home/ivan/Projects/grafana/xk6-browser
2022/01/24 12:08:13 [INFO] Pinning versions
2022/01/24 12:08:13 [INFO] exec (timeout=0s): /home/ivan/.local/go/bin/go mod edit -require go.k6.io/k6@latest
2022/01/24 12:08:13 [INFO] exec (timeout=0s): /home/ivan/.local/go/bin/go mod tidy
go: finding module for package github.com/nxadm/tail
go: found github.com/grafana/xk6-browser in github.com/grafana/xk6-browser v0.0.0-00010101000000-000000000000
go: found github.com/nxadm/tail in github.com/nxadm/tail v1.4.8
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto imports
        google.golang.org/protobuf/reflect/protoregistry tested by
        google.golang.org/protobuf/reflect/protoregistry.test imports
        github.com/google/go-cmp/cmp/cmpopts loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/diff loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/flags loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/function loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/value loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1

To upgrade to the versions selected by go 1.16:
        go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
        go mod tidy -compat=1.17
For other options, see:
        https://golang.org/doc/modules/pruning
2022/01/24 12:08:13 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-01-24-1208.2570827279
2022/01/24 12:08:13 [FATAL] exit status 1

This fixes a strange build error (I'm using Go v1.17.3):

$ xk6 build --with github.com/grafana/xk6-browser=.                                                                                                                                        <<<
2022/01/24 12:08:13 [INFO] Temporary folder: /tmp/buildenv_2022-01-24-1208.2570827279
2022/01/24 12:08:13 [INFO] Writing main module: /tmp/buildenv_2022-01-24-1208.2570827279/main.go
2022/01/24 12:08:13 [INFO] Initializing Go module
2022/01/24 12:08:13 [INFO] exec (timeout=10s): /home/ivan/.local/go/bin/go mod init k6
go: creating new go.mod: module k6
go: to add module requirements and sums:
        go mod tidy
2022/01/24 12:08:13 [INFO] Replace github.com/grafana/xk6-browser => /home/ivan/Projects/grafana/xk6-browser
2022/01/24 12:08:13 [INFO] exec (timeout=10s): /home/ivan/.local/go/bin/go mod edit -replace github.com/grafana/xk6-browser=/home/ivan/Projects/grafana/xk6-browser
2022/01/24 12:08:13 [INFO] Pinning versions
2022/01/24 12:08:13 [INFO] exec (timeout=0s): /home/ivan/.local/go/bin/go mod edit -require go.k6.io/k6@latest
2022/01/24 12:08:13 [INFO] exec (timeout=0s): /home/ivan/.local/go/bin/go mod tidy
go: finding module for package github.com/nxadm/tail
go: found github.com/grafana/xk6-browser in github.com/grafana/xk6-browser v0.0.0-00010101000000-000000000000
go: found github.com/nxadm/tail in github.com/nxadm/tail v1.4.8
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto imports
        google.golang.org/protobuf/reflect/protoregistry tested by
        google.golang.org/protobuf/reflect/protoregistry.test imports
        github.com/google/go-cmp/cmp/cmpopts loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/diff loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/flags loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/function loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1
k6 imports
        go.k6.io/k6/cmd imports
        go.k6.io/k6/js imports
        go.k6.io/k6/js/modules/k6/grpc imports
        github.com/golang/protobuf/proto tested by
        github.com/golang/protobuf/proto.test imports
        github.com/google/go-cmp/cmp imports
        github.com/google/go-cmp/cmp/internal/value loaded from github.com/google/[email protected],
        but go 1.16 would select v0.5.1

To upgrade to the versions selected by go 1.16:
        go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
        go mod tidy -compat=1.17
For other options, see:
        https://golang.org/doc/modules/pruning
2022/01/24 12:08:13 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-01-24-1208.2570827279
2022/01/24 12:08:13 [FATAL] exit status 1
@imiric imiric requested a review from inancgumus January 24, 2022 11:12
@imiric imiric force-pushed the fix/build-k6-v0.36.0 branch from c2be634 to e0412a9 Compare January 24, 2022 11:33
@imiric imiric force-pushed the fix/build-k6-v0.36.0 branch from e0412a9 to de8c9d2 Compare January 24, 2022 13:19
@imiric imiric mentioned this pull request Jan 24, 2022
@imiric
Copy link
Contributor Author

imiric commented Jan 25, 2022

Merging this since Inanc is OoO and we need a working main.

@imiric imiric merged commit ed0de4f into main Jan 25, 2022
@imiric imiric deleted the fix/build-k6-v0.36.0 branch January 25, 2022 08:45
@imiric imiric added this to the v0.2.0 milestone Feb 28, 2022
@inancgumus inancgumus added the dependencies Pull requests that update a dependency file label Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants