Skip to content

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Mar 13, 2023

When applied to an alias target, the providers function of cquery's --output=starlark mode now returns the providers of the aliased target rather than None.

This is achieved by moving getProvidersDict from AbstractConfiguredTarget up to ConfiguredTarget.

Fixes #17749

@fmeum fmeum requested a review from lberki as a code owner March 13, 2023 14:22
@fmeum
Copy link
Collaborator Author

fmeum commented Mar 13, 2023

@gregestren Could you review?

@illicitonion Could you check that this fixes the issue?

@sgowroji sgowroji added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Mar 13, 2023
When applied to an `alias` target, the `providers` function of
`cquery`'s `--output=starlark` mode now returns the providers of the
aliased target rather than `None`.

This is achieved by moving `getProvidersDict` from
`AbstractConfiguredTarget` up to `ConfiguredTarget`.
@fmeum fmeum force-pushed the 17749-cquery-alias-providers branch from 117f358 to 32229c2 Compare March 13, 2023 15:53
@illicitonion
Copy link
Contributor

Worked for me, thanks!

@keertk keertk requested a review from gregestren March 13, 2023 16:56
Copy link
Contributor

@gregestren gregestren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Mar 13, 2023
@sgowroji sgowroji removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Mar 15, 2023
@fmeum fmeum deleted the 17749-cquery-alias-providers branch March 15, 2023 06:39
@fmeum
Copy link
Collaborator Author

fmeum commented Mar 15, 2023

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Mar 15, 2023
@Wyverald
Copy link
Member

@bazel-io fork 6.2.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Mar 15, 2023
ShreeM01 pushed a commit to ShreeM01/bazel that referenced this pull request Mar 15, 2023
When applied to an `alias` target, the `providers` function of `cquery`'s `--output=starlark` mode now returns the providers of the aliased target rather than `None`.

This is achieved by moving `getProvidersDict` from `AbstractConfiguredTarget` up to `ConfiguredTarget`.

Fixes bazelbuild#17749

Closes bazelbuild#17753.

PiperOrigin-RevId: 516707744
Change-Id: I840588d605e3a64b968a019cf4bf43b56d18f4f5
keertk added a commit that referenced this pull request Mar 20, 2023
* Add support for alias targets to cquery's `providers`

When applied to an `alias` target, the `providers` function of `cquery`'s `--output=starlark` mode now returns the providers of the aliased target rather than `None`.

This is achieved by moving `getProvidersDict` from `AbstractConfiguredTarget` up to `ConfiguredTarget`.

Fixes #17749

Closes #17753.

PiperOrigin-RevId: 516707744
Change-Id: I840588d605e3a64b968a019cf4bf43b56d18f4f5

* Remove extra code

---------

Co-authored-by: Fabian Meumertzheim <[email protected]>
Co-authored-by: keertk <[email protected]>
fweikert pushed a commit to fweikert/bazel that referenced this pull request May 25, 2023
When applied to an `alias` target, the `providers` function of `cquery`'s `--output=starlark` mode now returns the providers of the aliased target rather than `None`.

This is achieved by moving `getProvidersDict` from `AbstractConfiguredTarget` up to `ConfiguredTarget`.

Fixes bazelbuild#17749

Closes bazelbuild#17753.

PiperOrigin-RevId: 516707744
Change-Id: I840588d605e3a64b968a019cf4bf43b56d18f4f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alias targets should expose FilesToRunProvider if actual has one

6 participants