Commit f22f39c
authored
fix(precompiling): only add pyc to default outputs if precompiling explicitly enabled for target (#2307)
This fixes a bug where precompiled files were *always* being added to
the default outputs
of a target. The intent is they are only added to a target's default
outputs if the
target explicitly opted into precompiling. This went unnoticed because
the exec tools
toolchain is still disabled by default, so the test that verifies a
basic py_binary's
default outputs didn't generate implicit pyc files. It was introduced
when fixing the
pyc collection bug.
To fix, only add the pyc files deemed "required", not all the pyc files
generated.
Also added a test to capture this case to the precompile tests.1 parent dd5db65 commit f22f39c
File tree
2 files changed
+33
-1
lines changed- python/private
- tests/base_rules/precompile
2 files changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
517 | 549 | | |
518 | 550 | | |
519 | 551 | | |
| |||
0 commit comments