Bazel's "modules" system as of Bazel 6+ divides the world into "modules", each one of which can invoke "extensions" to request side-effects and configuration above and beyond the "normal" Bazel build graph. pip.parse() and the new uv.project() machinery are extensions.
Extensions' view of the world is a global one. They see all the requested configurations from all modules "at once", so they can do things like global reuse of generated targets.
The new uv extension's world is one of projects, being a (pyproject.toml, uv.lock) pair. This allows us to do [dependency-groups] which don't exist in the uv.lock alone, and compute extra activation modes.
Notionally the reworked architecture is simple and follows the same pattern as the original version. Translate every wheel in any uv.lock into a whl_file__* repo, ...Translate every sdist in any uv.lock into a sdist_file__* repo, containing the fileFor every versioned package in each lock with a sdist, create a `sdist_b