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

Ability to specify command args for bazel query #292

Open
daivinhtran opened this issue Jan 26, 2023 · 2 comments
Open

Ability to specify command args for bazel query #292

daivinhtran opened this issue Jan 26, 2023 · 2 comments

Comments

@daivinhtran
Copy link
Contributor

bazel.commandLine.commandArgs is only passed into bazel test and bazel build commands, not bazel query.

I have a scenario where I need to use --config or --package_path at the end of the command bazel query.

Can we add a configurable field to pass in args to bazel query? Currently, we have startupOptions which results to bazel [startupOptions] query. However, there isn't a way to have bazel query [additionalArgs].

@hypdeb
Copy link
Contributor

hypdeb commented Jan 5, 2024

Would it be an option for you to define your query command line arguments in your .bazelrc file like so:

query --package_path=...

What would be cool though, I think, is if this extension offered some UI element to select configuration aliases per Bazel command from the ones available in your .bazelrc file.

@daivinhtran
Copy link
Contributor Author

Would it be an option for you to define your query command line arguments

Yes

What would be cool though, I think, is if this extension offered some UI element to select configuration aliases per Bazel command from the ones available in your .bazelrc file.

I'm not sure how feasible this is. Usually the configs are driven by the set of configs and their default values statically written in the package.json file. The .bazelrc is not static and dependent on specific repos.

However, it would be nice to be able to specify --config=<alias> somewhere in the configs window.

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

No branches or pull requests

2 participants