Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem parsing go.mod since k6 v0.32.0 update #19

Closed
davidgourde opened this issue May 12, 2021 · 4 comments
Closed

Problem parsing go.mod since k6 v0.32.0 update #19

davidgourde opened this issue May 12, 2021 · 4 comments

Comments

@davidgourde
Copy link

Since the k6 update v0.32.0 went live (earlier today), the extension I was working on stopped working. The error I get is:

go: github.com/k6io/k6@v0.32.0: parsing go.mod:
	module declares its path as: go.k6.io/k6
	        but was required as: github.com/k6io/k6

I started having this error even without updating anything, and trying to build with v0.31.1 or v0.32.0. k6 mentions a breaking change for the xk6 extensions, but I do not know how to fix this.

The expected outcome is that the xk6 build command works, either with v0.31.1 or v0.32.0.

@na--
Copy link
Member

na-- commented May 12, 2021

Replace the github.com/k6io/k6 imports in your extension code with go.k6.io/k6, then delete github.com/k6io/k6 from your go.mod and go.sum files and run go get go.k6.io/k6@latest && go mod tidy in your repo.

@na--
Copy link
Member

na-- commented May 13, 2021

I just realized we'd forgotten to release a new xk6 version after the k6 v0.32.0 release 🤦‍♂️ That might not have been a problem if you installed the latest xk6 from source, but if you used the official releases, it could have tripped you up as well 😞 Just tagged and released this: https://github.com/k6io/xk6/releases/tag/v0.4.1

@mstoykov
Copy link
Contributor

I have gone through most extensions in this list and have made PRs or commits in my repository doing the required change. As an example this commit from one of my simple extensions.

I did not do this by hand what I did was basically ran

rg  github.com/loadimpact/k6 -l -0  | xargs -0 sed -i 's|github.com/loadimpact/k6|go.k6.io/k6|g'
go mod edit -require go.k6.io/k6@v0.32.0 
go mod tidy

And then edit the READMEs if required

@na-- na-- closed this as completed May 13, 2021
@davidgourde
Copy link
Author

Thanks @na-- for releasing a new xk6 version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants