-
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
Ability to query for runtime dependencies #21830
Comments
I think the way to achieve this would be to write an aspect and collect the targets appropriately. |
Maybe I misunderstood, but I thought that However, I didn't realise that this might be possible via an aspect. I'll have a look into this option and see if it works! |
Consider |
Okay, I think I see why this is problematic. I'll see if I can get something going with an aspect. |
Description of the feature request:
I believe it would be useful to query for the "runtime" dependencies of a given target. By "runtime" here, I don't necessarily just mean the content of the
runtime_deps
attribute that exists on some targets, but the set of bothdeps
andruntime_deps
excluding anything marked asneverlink=True
.If this feature already exists, I can't see anything obvious in the documentation about it.
As an example:
Given the following targets, I'd expect to be able to query for something similar to the following:
I've represented it here as a query function, but I'm not sure if a command line argument would be more appropriate?
Which category does this issue belong to?
Core
What underlying problem are you trying to solve with this feature?
To be able to query for the dependencies of a target that will be required at runtime.
Which operating system are you running Bazel on?
Ubuntu 23.10
What is the output of
bazel info release
?release 6.4.0
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 couldn't find anything obvious
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: