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

[FEATURE REQUEST] Allow passing arbitrary arguments to viceroy via fastly compute serve #1047

Closed
tedmielczarek-fastly opened this issue Oct 16, 2023 · 3 comments

Comments

@tedmielczarek-fastly
Copy link

Is your feature request related to a problem? Please describe.
Viceroy recently (in v0.9.0) gained a new commandline option --unknown-import-behavior. It would be nice to be able to use this when using fastly compute serve.

Describe the solution you'd like
It might work to allow passing arbitrary options to viceroy by way of fastly compute serve. Perhaps by simply taking anything after a -- like many other tools that invoke sub-commands do? e.g.:

fastly compute serve --verbose -- --unknown-import-behavior=zero-or-null

Would result in the CLI executing viceroy like:

viceroy serve [computed options] --unknown-import-behavior=zero-or-null bin/main.wasm

That is, anything passed after -- would be inserted in the viceroy commandline after all computed options, but before the computed input wasm file.

Describe alternatives you've considered
A new matching option could be added to fastly compute serve to plumb this option down to viceroy. This feels a bit like busywork and exposes options that most users are unlikely to need to support niche use cases.

Additional context
One can work around this currently by avoiding fastly compute serve and running fastly compute build and then manually invoking viceroy, but it's a little clunky and also doesn't support the nice --watch functionality of the CLI.

@Integralist
Copy link
Collaborator

Thanks @tedmielczarek-fastly I've created a ticket internally to investigate and track this request.

@fgsch
Copy link
Member

fgsch commented Apr 24, 2024

This has been implemented in #1186 using a slightly different approach as unfortunately there are other tools involved besides Viceroy.

I will leave this open until this feature is released.

@fgsch fgsch added the next release This will be included in the next release. label Apr 24, 2024
@fgsch fgsch removed the next release This will be included in the next release. label May 24, 2024
@fgsch
Copy link
Member

fgsch commented May 24, 2024

Done.

@fgsch fgsch closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants