Skip to content

Conversation

@rickeylev
Copy link
Collaborator

@rickeylev rickeylev commented Oct 15, 2024

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.

@rickeylev rickeylev enabled auto-merge October 16, 2024 16:35
@rickeylev rickeylev added this pull request to the merge queue Oct 16, 2024
Merged via the queue into bazel-contrib:main with commit f22f39c Oct 16, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.pyc.always.in.default.outputs branch October 16, 2024 17:01
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

Successfully merging this pull request may close these issues.

2 participants