Skip to content

Commit 51458e8

Browse files
authored
chore: fix some lingering GH archive URLs (#1108)
This was pointed out in a thread on [email protected]
1 parent c504355 commit 51458e8

File tree

4 files changed

+15
-51
lines changed

4 files changed

+15
-51
lines changed

.github/workflows/create_archive_and_notes.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,12 @@ http_archive(
8787
strip_prefix = "${PREFIX}/gazelle",
8888
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
8989
)
90+
91+
# To compile the rules_python gazelle extension from source,
92+
# we must fetch some third-party go dependencies that it uses.
93+
94+
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
95+
96+
_py_gazelle_deps()
9097
\`\`\`
9198
EOF

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ rules_python_version = "740825b7f74930c62f44af95c9a4c1bd428d2c53" # Latest @ 202
4646

4747
http_archive(
4848
name = "rules_python",
49-
sha256 = "3474c5815da4cb003ff22811a36a11894927eda1c2e64bf2dac63e914bfdf30f",
49+
# Bazel will print the proper value to add here during the first build.
50+
# sha256 = "FIXME",
5051
strip_prefix = "rules_python-{}".format(rules_python_version),
5152
url = "https://github.com/bazelbuild/rules_python/archive/{}.zip".format(rules_python_version),
5253
)

examples/build_file_generation/WORKSPACE

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,49 +55,20 @@ gazelle_dependencies()
5555

5656
# Remaining setup is for rules_python.
5757

58-
# You do not want to use the following command when you are using a WORKSPACE file
59-
# that is outside of rules_python repository.
60-
# This command allows targets from a local directory to be bound.
61-
# Which allows bazel to use targets defined in base rules_python directory.
62-
# If you are using this example outside of the rules_python git repo,
63-
# use the http_archive command that is commented out below.
64-
# https://bazel.build/reference/be/workspace#local_repository
58+
# DON'T COPY_PASTE THIS.
59+
# Our example uses `local_repository` to point to the HEAD version of rules_python.
60+
# Users should instead use the installation instructions from the release they use.
61+
# See https://github.com/bazelbuild/rules_python/releases
6562
local_repository(
6663
name = "rules_python",
6764
path = "../..",
6865
)
6966

70-
# When not using this example in the rules_python git repo you would load the python
71-
# ruleset using the following StarLark.
72-
# See https://github.com/bazelbuild/rules_python#getting-started for the latest
73-
# ruleset version.
74-
#
75-
# The following StarLark would replace the `local_repository` rule mentioned above.
76-
#
77-
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
78-
# http_archive(
79-
# name = "rules_python",
80-
# sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
81-
# strip_prefix = "rules_python-0.16.1",
82-
# url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
83-
# )
84-
85-
# We import the repository-local rules_python_gazelle_plugin version in order to
86-
# be able to test development changes to the plugin.
8767
local_repository(
8868
name = "rules_python_gazelle_plugin",
8969
path = "../../gazelle",
9070
)
9171

92-
# When loading the gazelle plugin outside this repo, use the http_archive rule as follows:
93-
#
94-
#http_archive(
95-
# name = "rules_python_gazelle_plugin",
96-
# sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
97-
# strip_prefix = "rules_python-0.16.1/gazelle",
98-
# url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
99-
#)
100-
10172
# Next we load the toolchain from rules_python.
10273
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
10374

gazelle/README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,8 @@ Follow the instructions at https://github.com/bazelbuild/bazel-gazelle#running-g
1414
Next, we need to fetch the third-party Go libraries that the python extension
1515
depends on.
1616

17-
Add this to your `WORKSPACE`:
18-
19-
```starlark
20-
http_archive(
21-
name = "rules_python_gazelle_plugin",
22-
sha256 = "",
23-
strip_prefix = "rules_python-0.17.0/gazelle",
24-
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.17.0.tar.gz",
25-
)
26-
27-
# To compile the rules_python gazelle extension from source,
28-
# we must fetch some third-party go dependencies that it uses.
29-
30-
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
31-
32-
_py_gazelle_deps()
33-
```
17+
See the installation `WORKSPACE` snippet on the Releases page:
18+
https://github.com/bazelbuild/rules_python/releases
3419

3520
Next, we'll fetch metadata about your Python dependencies, so that gazelle can
3621
determine which package a given import statement comes from. This is provided

0 commit comments

Comments
 (0)