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

needs go.work if using mono repos #110

Open
gedw99 opened this issue Sep 14, 2024 · 2 comments
Open

needs go.work if using mono repos #110

gedw99 opened this issue Sep 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gedw99
Copy link

gedw99 commented Sep 14, 2024

These examples fail if your inside a repo and works if your outside one.

inside a repo meaning where your have a go.mod above you in the file hierarchy.

xk6 build --output xk6-browser --with github.com/grafana/xk6-browser=.

xk6 build --with github.com/grafana/xk6-output-template

The way around this is to generate a touch go.work and then go work use ./xxx to point to where the golang that xk6 is pulling lives on disk, using a simple relative pathing.

I guess xk6 uses home tmp though ?

SO I could not figure out what this needs to be for me...

go work use ./xxx 

Anyone got some ideas :) ?

@szkiba
Copy link
Contributor

szkiba commented Sep 17, 2024

Thank you for reporting this.

This is a known bug and we are planning to fix it. Currently, disabling go work is the recommended workaround.

This can be done by setting the GOWORK environment variable to off. This (for linux & osx) can also be done at the beginning of the xk6 command line:

GOWORK=off xk6 build --output xk6-browser --with github.com/grafana/xk6-browser=.

@szkiba szkiba added the bug Something isn't working label Sep 17, 2024
@gedw99
Copy link
Author

gedw99 commented Sep 17, 2024

thanks @szkiba for acknowledging the bug.

I still have to use go work, because of how my users use the system.

I guess I will just have to wait this out until you fix it.

I am pretty sure its just a matter of telling the system where the golang code will be checked out too, and then telling go work with go work use .....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants