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

Improve the end-of-build message #38

Closed
sniku opened this issue Feb 9, 2022 · 1 comment
Closed

Improve the end-of-build message #38

sniku opened this issue Feb 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sniku
Copy link
Collaborator

sniku commented Feb 9, 2022

xk6 currently makes assumptions that users are familiar with go build system and understand what $PATH is.
New users often assume that xk6 build process will replace their existing k6 installation. This is not the case, instead, the new build is in a $GOPATH directory, which is usually not part of $PATH.

I suggest the following:

  1. At the end of the xk6 build process we print instructions on where to locate the new build and how to use it
  2. [bonus for extra points] Detect the path of globally installed k6 and give the user the exact command to replace it with the new build (sudo cp /gopath/bin/k6 /usr/local/bin/k6)

Suggestion for the message

***************************************************
* BUILD COMPLETE - FOLLOW THESE STEPS TO CONTINUE *
***************************************************
xk6 has now produced a new k6 binary including "{xk6-redis}" extension. 
The new binary is located in {`/home/sniku/go/bin/k6`}. 
To use it you need to call it directly `./home/sniku/go/bin/k6 run script.js` 
or replace your globally installed k6 with the new one. 
@imiric
Copy link
Contributor

imiric commented Feb 9, 2022

Yeah, that would help clarify things. As well as document it better in the README, it's not very clear what happens by default.

Though I wouldn't suggest replacing the globally installed k6 binary. For one it might conflict with package managers if k6 was installed from a package, but it would also cause confusion if they build a second binary and overwrite a previous one that had another extension. This is really up to the user how they want to handle it (e.g. renaming the binary to k6-redis, etc.), but it should be a conscious decision, not a suggestion from us.

At the end of the day though, xk6 is a tool for developers and advanced users. It expects some background knowledge around setting up their Go environment (which is currently also a common issue, see #36 and on the forum), how $PATH works, and how to run a binary from the current working directory. Until we have a more user friendly way of at least installing extensions, some of which we've discussed, there's not much we can do besides improving the documentation and notices like this.

@imiric imiric added the enhancement New feature or request label Feb 9, 2022
javaducky added a commit that referenced this issue Mar 17, 2022
javaducky added a commit that referenced this issue Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants