Commit ddbac4a
Add incompatible flag to disable cfg="host" from Starlark (bazelbuild#15436)
Host transitions are problematic where the host and exec environment are
different (e.g., with Remote Execution). This change adds an incompatible
flag that fails analysis if Starlark rules use `cfg = "host"`.
Migrating is pretty straigt forward (replace `host` with `exec`) and
should be automatable by buildifier (although I haven't tried to do so).
Closes bazelbuild#14383.
PiperOrigin-RevId: 441253060
Co-authored-by: Yannic <[email protected]>1 parent e239f58 commit ddbac4a
File tree
4 files changed
+47
-7
lines changed- src
- main/java/com/google/devtools/build/lib
- analysis/starlark
- packages/semantics
- starlarkbuildapi
- test/java/com/google/devtools/build/lib/starlark
4 files changed
+47
-7
lines changedLines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
229 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
230 | 241 | | |
231 | 242 | | |
232 | 243 | | |
| |||
252 | 263 | | |
253 | 264 | | |
254 | 265 | | |
255 | | - | |
256 | | - | |
| 266 | + | |
| 267 | + | |
257 | 268 | | |
258 | 269 | | |
259 | 270 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
551 | 562 | | |
552 | 563 | | |
553 | 564 | | |
| |||
615 | 626 | | |
616 | 627 | | |
617 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
618 | 632 | | |
619 | 633 | | |
620 | 634 | | |
| |||
683 | 697 | | |
684 | 698 | | |
685 | 699 | | |
| 700 | + | |
| 701 | + | |
686 | 702 | | |
687 | 703 | | |
688 | 704 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
735 | 743 | | |
736 | 744 | | |
737 | 745 | | |
| |||
742 | 750 | | |
743 | 751 | | |
744 | 752 | | |
745 | | - | |
| 753 | + | |
746 | 754 | | |
747 | 755 | | |
748 | 756 | | |
| |||
0 commit comments