From e0d60d0a15a8e2c49b9b2c167bdd18ee90e92ea9 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 1 Nov 2024 09:51:44 -0700 Subject: [PATCH] docs: clarify that PyInfo.transitive_source may not include py files --- python/private/py_info.bzl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python/private/py_info.bzl b/python/private/py_info.bzl index 7a0bdeaef8..4b2b8888c9 100644 --- a/python/private/py_info.bzl +++ b/python/private/py_info.bzl @@ -129,11 +129,14 @@ to always include these files, as the originating target expects them to exist. "transitive_sources": """\ :type: depset[File] -A (`postorder`-compatible) depset of `.py` files appearing in the target's -`srcs` and the `srcs` of the target's transitive `deps`. - -These are `.py` source files that are considered required and downstream -binaries (or equivalent) must include in their outputs. +A (`postorder`-compatible) depset of `.py` files that are considered required +and downstream binaries (or equivalent) **must** include in their outputs +to have a functioning program. + +Normally, these are the `.py` files in the appearing in the target's `srcs` and +the `srcs` of the target's transitive `deps`, **however**, precompile settings +may cause `.py` files to be omitted. In particular, pyc-only builds may result +in this depset being **empty**. ::::{versionchanged} 0.37.0 The files are considered necessary for downstream binaries to function;