Skip to content

Commit c17e69f

Browse files
committed
snapshots
1 parent 0453ba6 commit c17e69f

8 files changed

Lines changed: 341 additions & 23 deletions

File tree

py/private/providers.bzl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -152,26 +152,3 @@ PyVirtualInfo = provider(
152152
"resolutions": "FIXME",
153153
},
154154
)
155-
156-
PyWheelPlanInfo = provider(
157-
doc = """Pre-computed wheel collision plan for a transitive wheel closure.
158-
159-
Emitted by ``py_library`` (and other wheel-carrying rules) so that
160-
downstream ``py_venv`` targets can skip re-running
161-
``resolve_wheel_collisions`` when the wheel set hasn't changed.
162-
163-
Bazel's skyframe analyses each provider-producing target once; when
164-
multiple binaries share the same library dep, the plan is computed
165-
once and reused.
166-
""",
167-
fields = {
168-
"wheel_fingerprints": "tuple[str] — sorted site_packages_rfpaths, for matching",
169-
"top_level_to_site_pkgs": "dict — from resolve_wheel_collisions",
170-
"fully_covered": "dict — from resolve_wheel_collisions",
171-
"console_scripts_map": "dict — from resolve_wheel_collisions",
172-
"merge_groups": "list — from resolve_wheel_collisions",
173-
"tree_by_sp": "dict — from _build_wheel_lookups",
174-
"known_layout": "dict — from _build_wheel_lookups",
175-
"collisions": "list[struct] — recorded collisions for policy enforcement",
176-
},
177-
)

py/private/py_venv/py_venv.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def _common_providers(ctx, shared, executable = None):
167167
bin_python = shared.venv.bin_python,
168168
imports = shared.imports_depset,
169169
transitive_sources = shared.srcs_depset,
170+
all_files = depset(shared.venv.all_files),
170171
),
171172
coverage_common.instrumented_files_info(
172173
ctx,

py/private/py_venv/snapshots/BUILD.bazel

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/private/py_venv/snapshots/main.py

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/private/py_venv/snapshots/snapshots/venv.launcher.sh

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/private/py_venv/snapshots/snapshots/venv.tree.snap

Lines changed: 209 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/private/py_venv/snapshots/venv_tree_snap.bzl

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/private/py_venv/types.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ binary's launcher exec's the venv's `bin_python`.
1818
"bin_python": "File — the venv's bin/python symlink. Callers needing a launcher target point here.",
1919
"imports": "depset[str] — rlocation-root-relative import paths covered by this venv. Mirrors `PyInfo.imports` of the venv's dep closure.",
2020
"transitive_sources": "depset[File] — first-party Python sources carried by this venv (its own `srcs` plus those of any `deps` that emit `PyInfo`). Surfaced by py_binary as `PyInfo.transitive_sources` so downstream consumers see the same source closure they'd see if srcs/deps lived on the binary directly.",
21+
"all_files": "depset[File] — every file and symlink declared by `assemble_venv`, for snapshot/test consumers that need the full venv output set.",
2122
},
2223
)

0 commit comments

Comments
 (0)