Skip to content

Commit 451cd7f

Browse files
authored
Merge branch 'main' into dependabot/pip/docs/snowballstemmer-3.0.1
2 parents 30bc00f + babfc2b commit 451cd7f

14 files changed

+965
-602
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ END_UNRELEASED_TEMPLATE
101101
`# gazelle:python_resolve_sibling_imports true`
102102
* (pypi) Show overridden index URL of packages when downloading metadata have failed.
103103
([#2985](https://github.com/bazel-contrib/rules_python/issues/2985)).
104+
* (toolchains) use "command -v" to find interpreter in `$PATH`
105+
([#3150](https://github.com/bazel-contrib/rules_python/pull/3150)).
106+
* (pypi) `bazel vendor` now works in `bzlmod` ({gh-issue}`3079`).
104107

105108
{#v0-0-0-added}
106109
### Added

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ babel==2.17.0 \
1717
--hash=sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d \
1818
--hash=sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2
1919
# via sphinx
20-
certifi==2025.7.14 \
21-
--hash=sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2 \
22-
--hash=sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995
20+
certifi==2025.8.3 \
21+
--hash=sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407 \
22+
--hash=sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5
2323
# via requests
2424
charset-normalizer==3.4.2 \
2525
--hash=sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4 \

gazelle/README.md

Lines changed: 1 addition & 511 deletions
Large diffs are not rendered by default.

gazelle/docs/development.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Development
2+
3+
Gazelle extensions are written in Go.
4+
5+
See the [Gazelle documentation][gazelle-extend] for more information on
6+
extending Gazelle.
7+
8+
[gazelle-extend]: https://github.com/bazel-contrib/bazel-gazelle/blob/master/extend.md
9+
10+
11+
## Dependencies
12+
13+
If you add new Go dependencies to the plugin source code, you need to "tidy"
14+
the go.mod file. After changing that file, run `go mod tidy` or
15+
`bazel run @go_sdk//:bin/go -- mod tidy` to update the `go.mod` and `go.sum`
16+
files. Then run `bazel run //:gazelle_update_repos` to have gazelle add the
17+
new dependencies to the `deps.bzl` file. The `deps.bzl` file is used as
18+
defined in our `/WORKSPACE` to include the external repos Bazel loads Go
19+
dependencies from.
20+
21+
Then after editing Go code, run `bazel run //:gazelle` to generate/update
22+
the rules in the `BUILD.bazel` files in our repo.
23+
24+
25+
## Tests
26+
27+
:::{seealso}
28+
{gh-path}`gazelle/python/testdata/README.md`
29+
:::
30+
31+
To run tests, {command}`cd` into the {gh-path}`gazelle` directory and run
32+
`bazel test //...`.
33+
34+
Test cases are found at {gh-path}`gazelle/python/testdata`. To make a new
35+
test case, create a directory in that folder with the following files:
36+
37+
+ `README.md` with a short blurb describing the test case(s).
38+
+ `test.yaml`, either empty (with just the docstart `---` line) or with
39+
the expected `stderr` and exit codes of the test case.
40+
+ and empty `WORKSPACE` file
41+
42+
You will also need `BUILD.in` and `BUILD.out` files somewhere within the test
43+
case directory. These can be in the test case root, in subdirectories, or
44+
both.
45+
46+
+ `BUILD.in` files are populated with the "before" information - typically
47+
things like Gazelle directives or pre-existing targets. This is how the
48+
`BUILD.bazel` file looks before running Gazelle.
49+
+ `BUILD.out` files are the expected result after running Gazelle within
50+
the test case.
51+
52+
:::{tip}
53+
The easiest way to create a new test is to look at one of the existing test
54+
cases.
55+
:::
56+
57+
The source code for running tests is {gh-path}`gazelle/python/python_test.go`.

0 commit comments

Comments
 (0)