-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Read aspect providers in cquery #22528
Comments
cc @mai93 |
Can specifying only the output group containing the file with aspect provider data via |
That's a good point. I just tried it out, and it does appear to work. I still think this suggestion has value, but it can be achieved via other means, so it's probably not a priority. |
The So I would be very happy if this issue got fixed soon 👍 |
Description of the feature request:
Cquery should be able to read providers that were created by an aspect.
I tested, and the aspects already run during cquery (see #16310 (comment)). So all I'm asking is that we surface that via cquery. I suspect that this will likely be a relatively simple change, since the aspects already run, but it depends on how it's implemented.
Which category does this issue belong to?
Rules API
What underlying problem are you trying to solve with this feature?
Aspects are very useful for allowing IDEs access to metadata about the build. However, at the moment, IIUC, the way you have to use them is to:
bazel build <something> --aspects=...
Sometimes, however, you don't need anything other than the providers created by the aspect. In cases like this, cquery should be sufficient. For example, generating
rust-project.json
in rust can be done without building a single target.The use case that I was trying to do for this is that if I run cquery on the following target:
Then I want cquery to attach a
RustAnalyzerInfo
object to:foo
. This can then be picked up on by the rust-analyzer vscode extension. At the moment we usebazel build
instead ofbazel cquery
, which means that if any bazel target fails to build, then we can't run get IDE support for our rust code.Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
I commented on #16310 (comment) last week
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: