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

Support same_pkg_direct_rdeps in aquery (or post-analysis queries more generally) #24916

Open
shahms opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request untriaged

Comments

@shahms
Copy link

shahms commented Jan 13, 2025

Description of the feature request:

It's not currently possible to reasonably replicate the behavior of bazel print_action --nobuild --compile_one_dependency path/to/source_file.cc using bazel aquery. While print_action and --compile_one_dependency exist, this isn't a huge deal but as the latter is intended to be removed, it would be good to have a reasonable replacement.

Which category does this issue belong to?

Core

What underlying problem are you trying to solve with this feature?

Provide a suitable replacement for --compile_one_dependency before it goes away.

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 6.5.0-7

If bazel info release returns development 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 ?


Have you found anything relevant by searching the web?

Primarily just the comment indicating that --compile_one_dependency is going to be removed
#13419 (comment)

Any other information, logs, or outputs that you want to share?

No response

@haxorz
Copy link
Contributor

haxorz commented Jan 29, 2025

Mai, I remember you looked into this general domain internally at Google in ~2022. Can you please share your thoughts?

this isn't a huge deal but as the latter is intended to be #13419 (comment), it would be good to have a reasonable replacement.

Fyi @comius, the author of the linked comment.

@mai93
Copy link
Contributor

mai93 commented Jan 30, 2025

I cannot remember the blockers for allowing same_pkg_direct_rdeps to be available for aquery. But I remember that aquery with same_pkg_direct_rdeps were not enough to exactly replace what print_action --compile_one_dependency does. For example print_action can actually perform a build on the selected target while aquery does not. Also --compile_one_dependency can unwrap filegroup chains to get to a meaningful rdep of the give file while same_pkg_direct_rdeps does not do that. Maybe siblings can be a better fit in this case but it is also not available for aquery IIRC.

@shahms
Copy link
Author

shahms commented Jan 30, 2025

Yeah, the error from attempting to use same_pkg_direct_rdeps from aquery specifically mentions the use of siblings as the underlying cause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

6 participants