-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Using Unregistered Extensions #21
Comments
I think this will be a common case, and I'd like to avoid the need to pass CLI flags. This could be solved by adding the path to the Pragma use k6 with github.com/org/foo > 0.2
# or any other alternative Two reasons why i think this is important: (1) Better UX. I don't need to pass a CLI flag. Which is also more cumbersome because I need to know beforehand which extensions and paths to register. (2) It makes collaboration much easier. For example, someone wants to run a test that was created by another team. Then, they need to know which extension and paths to register. k6 objective should be to allow running a test just like Note that I don't knowhow the package manager works internally. An alternative, something like |
Hi @ppcano ,Thanks for the feedback and suggestion. Your use case is absolutely valid and should be supported. My original consideration was that the source of the test should not show the knowledge of whether the given extension is registered or not. Especially since this may be a temporary state and the extension may be registered over time. However, I understand your use case. Taking this into account, the proposed solution is modified as follows: In the pragma example "use k6 with k6/x/foo=github.com/org/foo > 0.2" command line example
What do you think about this proposed solution? |
@ppcano Introducing a new register pragma With the help of the "use k6 register name module" where "use k6 register k6/x/foo github.com/org/xk6-foo" --register flag The
where
For your questions:
The register and replace features should be independent of each other. The register feature is used when assigning a module to the dependency, and the replace feature replaces the module during the build.
The purpose of |
Just one more alternative solution: In addition to the extension registry, support for other methods to resolve the extension name to the go module. Such a method can be the GitHub repository search based on the xk6 topics. |
Feature Description
Proprietary extensions are usually not registered in the extension registry. Their use would be made possible by supporting the use of unregistered extensions.
Suggested Solution (optional)
New
--register
flag:--register name=path
use unregistered extension, wherename
is the name of the extension andpath
is the module path. It implies the use of the native builder (--builder native
)The text was updated successfully, but these errors were encountered: