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

platform_data does not forward Args or other Providers #11

Open
cramertj opened this issue Jun 4, 2024 · 4 comments
Open

platform_data does not forward Args or other Providers #11

cramertj opened this issue Jun 4, 2024 · 4 comments

Comments

@cramertj
Copy link

cramertj commented Jun 4, 2024

platform_data returns a DefaultInfo provider, discarding other providers from the original rule.

It also does not forward the args of the wrapped rule, so e.g. a py_binary with an args = [ ... ] parameter will not have its args provided when invoked through a platform_data rule.

@tpudlik
Copy link

tpudlik commented Jun 4, 2024

@katre @aranguyen

@katre
Copy link
Member

katre commented Jun 4, 2024

If there's a standard provider we can add it to the list to copy, but there's no way to programatically discover all providers of a dependency.

@fmeum
Copy link

fmeum commented Jun 4, 2024

This was solved for env by replacing the magic attribute with a provider. bazelbuild/bazel#16430 set out to do this but stalled - happy to revive it when there is consensus on the design.

@gregestren
Copy link
Collaborator

The args issue is specifically for --run_under=my_wrapped_py_binary?

I think a simple $ bazel run :my_wrapped_py_binary still works, doesn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants