Closed pablochacin closed 12 months ago
I've found depsync useful. I would suggest having it as a different installable tool rather than having it as a sub-command of xk6.
go install go.k6.io/xk6/cmd/depsync@latest
In this way, it can have an independent lifecycle. @roobre feel free to open a PR and assign the k6-core as the reviewer.
It sounds like we can close this issue, as it is now a dedicated tool https://github.com/grafana/go-depsync.
When developing an extension, it is convenient to keep dependencies shared with k6 synchronized at the same version to prevent conflicts.
In the context of the xk6-disruptor extension, @roobre developed a handy tool for checking the differences between the dependencies of an extension and
k6
The tool looks for overlapping dependencies with k6 which do not match the version used in the extension. Those dependencies are logged to stderr, and go get commands are generated to stdout to download the version k6 core is using.
An example of running in the main branch of xk6-disruptor (at the time of writing this issue)
This functionality could be added to xk6 as a help for developers, either as a subcommand or as an option that automatically updates the version before building the binary.