-
Notifications
You must be signed in to change notification settings - Fork 108
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
Relevant arguments are lost by the bazel aquery ...
portion of compile command generation
#170
Comments
I've just seen the It still doesn't work for I guess this is more a feature request then:
|
Hey, thanks for raising this, Ben. I really wish we could pull the args from Bazel, but I don't know of a way. (Won't bazel help return the options from its invocation, which wouldn't automatically include the additional options) Some workaround-ish ideas:
Chris |
Thanks @cpsauer ; I had a feeling this may be the result.
I've got a gnarly workaround where I've wrapped my bazel invocations in scripts that pull args out of the bazelrc and directly pass them in as The only suggestion I've got which is feasible but tedious, would be to evaluate the provided bazel-compile-commands-extractor/refresh.template.py Lines 1208 to 1212 in 33658ba
That's probably just putting lipstick on a pig / complicating your project, so I'm not sure if it would be the type of thing you'd want to add. |
Oh darn. I see. (Sorry for misunderstanding the `bazel help startup_options part and the startup positional restriction.) Sorta open to it if there's not a better way, but I think it'll be a bit tricky to get right with args? Just to make sure there aren't better ways given Bazel's functionality
|
I'm probably getting towards the nit-picky territory, but neither quite meet my needs:
Anyway, I'm happy for this to be closed as won't do given it's a bit boutique. Just thought I'd raise it in case I was missing something obvious 🙂 |
I probably can't do given some severe time constraints over here--but I'd be open to a PR if you're down to do it well. (Up to you, close if no.) Sorry to not have a magic bullet up my sleeve for ya here. Cheers, |
I've had a setup evolve so that it is now using a
bazelrc
in a custom location (i.e.bazel --bazelrc=/path/to/.bazelrc ...
is now how all of my commands are run).The
bazel aquery ...
portion of the compile command generation is a raw call that doesn't receive any of the arguments forwarded to it. Some simple examples:build --action_env=BAZEL_CXXOPTS="-std=c++20"
works when in abazelrc
in the default location, but not when in a custom location--registry
args also go missingIt leaves me in a situation where my project builds perfectly fine, but I can't generate commands because the logic is in a non-standard
bazelrc
location or passed via thebazel run ...
command itself.I've:
refresh.template.py
works, but that is to brittle to meet what I needrefresh_compile_commands
function, but don't know enough about Bazel yet to know if it's even possible to access / forward these types of argsAny ideas?
The text was updated successfully, but these errors were encountered: