commit | 50f6ce749eb20fc53ace644d3bc91d50829e6c2d | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Mon Sep 02 06:14:51 2024 -0700 |
committer | GitHub <noreply@github.com> | Mon Sep 02 13:14:51 2024 +0000 |
tree | 3279b9d93fc36347639644655683749cd040a149 | |
parent | 36bb556220458d4692cf84c504fa9563b7bebb79 [diff] |
refactor(sphinxdocs): use bazel label format for internal object tracking (#2174) This changes the way objects are tracked to use Bazel label format instead of dotted notation. The dotted notation was problematic because it was ambiguous. For example, `foo.bar.baz` could mean `@foo//bar:baz` or `@foo//:bar.bzl%baz`. It also required various internal hacks to try and "unparse" the dotted notation into the "meaningful" part of an object to use in various contexts. For example, `//foo:bar` usually means `bar` is the key term to show, and `//foo:bar.bzl%baz.qux` usually means `qux` or `baz.qux` is the meaningful part. Also: * Make referring to things by the bzl-relative symbol names work. e.g. `baz.qux` can be used to reference `//foo:bar.bzl%baz.qux` * Fix the name/referencing of runtime_env_toolchains (it was using singular in the docs) * Add some more references to bazel inventory * Omit `--jobs=auto` for `sphinx_run`; multi-job invocations of Sphinx make it difficult to interactively run Sphinx for debugging, which is the point of `sphinx_run` * Add a basic test of cross-references * Make xrefs for `--name` format force looking in the flag object type. This avoids finding objects of a matching name of another object type; e.g "precompile" is both a flag and attribute name. * Cleanup the index entries: now the base name is displayed instead of the full name; e.g. "foo (target in //bar)" instead of "//foo:bar (target in //bar:BUILD.bazel)"
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.