bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
110 stars 75 forks source link

Fix platform_data #85

Closed tpudlik closed 9 months ago

tpudlik commented 9 months ago

These fixes are necessary for platform_data to work. Tested by building http://pwrev.dev/189772.

I was long confused by the need for the [0] index. It turns out this arises because "there's no easy distinction between patch and split transitions, and so all transitions require the index, even if it's not a split."

tpudlik commented 9 months ago

For the benefit of future searches: without the [0] you get the cryptic error,

Error: got Provider for sequence index, want int
tpudlik commented 9 months ago

An equivalent fix has been submitted to https://github.com/bazelbuild/rules_platform.