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

cquery missbehaves with aspects and output groups #24612

Open
ansonos opened this issue Dec 9, 2024 · 2 comments
Open

cquery missbehaves with aspects and output groups #24612

ansonos opened this issue Dec 9, 2024 · 2 comments
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged

Comments

@ansonos
Copy link

ansonos commented Dec 9, 2024

Description of the bug:

Using an aspect and an output group (setting one explicitly/removing default), to change "into what" a target is build, will result in an empty output when using cquery --output=files.

bazel build --output_groups=og --aspects=path%aspect //target
bazel cquery --output_groups=og --aspects=path%aspect //target --output=files
  • aspect creates a file
  • og is the output group used by aspect
  • Without overwriting the output_group the original/non-aspect file is shown.

Maybe I'm holding the tool wrong; I didn't find another way to figure out where bazel generated output from a bazel build invocation lands.

Which category does this issue belong to?

Core

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

linux

What is the output of bazel info release?

release 8.0.0rc8

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 ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

Same behaviour as 7.4.0 - didn't check earlier.

Have you found anything relevant by searching the web?

No response

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

No response

@github-actions github-actions bot added the team-Core Skyframe, bazel query, BEP, options parsing, bazelrc label Dec 9, 2024
@ansonos
Copy link
Author

ansonos commented Dec 9, 2024

I tried to get the output path via starlark:expr --starlark:expr="' '.join([f for f in target.files.to_list()])" but did not get the right file either.
Maybe I'm not selecting the right output group?

@ansonos
Copy link
Author

ansonos commented Dec 9, 2024

cquery seems to apply the aspect (verified via print). The output group or the aspect provider however can not be found / accessed.

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: bug untriaged
Projects
None yet
Development

No branches or pull requests

4 participants