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

Don't force latest k6 when building extensions #44

Merged
merged 4 commits into from
May 12, 2022
Merged

Conversation

mstoykov
Copy link
Contributor

an extension will always require k6 and a version of it. It makes little
sense to force newer version on users especially as we keep breaking
them and we need time to go fix them, but that can only happen after
release.

This still lets users specify the version (as latest for example) and
require the latest k6, it just isn't the default.

an extension will always require k6 and a version of it. It makes little
sense to force newer version on users especially as we keep breaking
them and we need time to go fix them, but that can only happen after
release.

This still lets users specify the version (as latest for example) and
require the latest k6, it just isn't the default.
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

Copy link
Contributor

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

This is a bit strange but it turns out that if you have replacements go
change how it resolves modules a bit and will try to get the latest
versions of some dependencies.

Also if you have one extension and you are building it from local
sources we would not run `go mod tidy` reliably. This doesn't really
matter in practice as we do run it almost every other command, but was
getting in the way of smaller fix.

Both of those are fixed with this commit and now we do definitely run
`go mod tidy` once we have requested all extensions and put down the
files needing them. And also only write a file requesting k6 directly at
the very end so it only try to get it's version at this point - and at
that point we should already have requested through an extension.
@mstoykov
Copy link
Contributor Author

Needed a bigger fix for when you do --with modulepath=localpath :( but it still fairly straightforward once I found out what was going wrong 🤦.

Can you guys please test this locally as well - I did a bunch of tests, but still will help if other people try it as well

This was as there was *possibly* nothing requesting k6 at the time it
was setup. Replaces on the other hand stick so XK6_K6_REPO always
worked.
environment.go Show resolved Hide resolved
environment.go Outdated Show resolved Hide resolved
Co-authored-by: Ivan Mirić <ivan@loadimpact.com>
@imiric imiric self-requested a review May 11, 2022 15:40
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked fine in my local tests 🤞

Copy link
Contributor

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞

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

Successfully merging this pull request may close these issues.

None yet

4 participants