feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public APIs#3835
Conversation
There was a problem hiding this comment.
Code Review
This pull request exposes VenvSymlinkEntry and VenvSymlinkKind as public symbols in //python:py_info.bzl and introduces features.loadable_symbols to detect public symbols exported by bzl files. It also implements VenvSymlinkEntryBuilder to construct symlink entries and integrates it into PyInfoBuilder. The feedback suggests adding validation for the kind argument, ensuring both kind and venv_path are set before building, and clearing the _venv_symlink_builders list after building to prevent duplicate entries on multiple builder calls.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…APIs Currently, `VenvSymlinkEntry` and `VenvSymlinkKind` are defined in the private `python/private/py_info.bzl` file, making them inaccessible to users who want to programmatically define virtual environment symlinks when using `PyInfo`. To fix this, we load and re-export both symbols in the public `python/py_info.bzl` file. Additionally, this change: * Adds `VenvSymlinkEntryBuilder` to allow fluent construction of symlink entries. * Adds `features.loadable_symbols` to allow programmatic detection of these public symbols. * Updates stardoc generation to document the new public APIs (with proper versionadded markup). * Updates and adds comprehensive unit tests.
4cceb5f to
2069521
Compare
Currently,
VenvSymlinkEntryandVenvSymlinkKindare defined in theprivate
python/private/py_info.bzlfile, making them inaccessible tousers who want to programmatically define virtual environment symlinks
when using
PyInfo(or at the least, having to load private filepaths).
To fix this, we load and re-export both symbols in the public
python/py_info.bzlfile.Along the way
VenvSymlinkEntryBuilderto allow fluent construction of symlinkentries via PyInfoBuilder.
features.loadable_symbolsto allow programmatic detection ofthese public symbols.