bazelbuild / rules_platform

Apache License 2.0
9 stars 4 forks source link

`platform_data` does not forward Args or other Providers #11

Open cramertj opened 5 months ago

cramertj commented 5 months ago

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 commented 5 months ago

@katre @aranguyen

katre commented 5 months ago

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 commented 5 months ago

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

gregestren commented 4 months ago

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?