Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some lingering GH archive URLs #1108

Merged
merged 1 commit into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/create_archive_and_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,12 @@ http_archive(
strip_prefix = "${PREFIX}/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
)

# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.

load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
\`\`\`
EOF
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ rules_python_version = "740825b7f74930c62f44af95c9a4c1bd428d2c53" # Latest @ 202

http_archive(
name = "rules_python",
sha256 = "3474c5815da4cb003ff22811a36a11894927eda1c2e64bf2dac63e914bfdf30f",
# Bazel will print the proper value to add here during the first build.
# sha256 = "FIXME",
strip_prefix = "rules_python-{}".format(rules_python_version),
url = "https://github.com/bazelbuild/rules_python/archive/{}.zip".format(rules_python_version),
)
Expand Down
37 changes: 4 additions & 33 deletions examples/build_file_generation/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,49 +55,20 @@ gazelle_dependencies()

# Remaining setup is for rules_python.

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

# When not using this example in the rules_python git repo you would load the python
# ruleset using the following StarLark.
# See https://github.com/bazelbuild/rules_python#getting-started for the latest
# ruleset version.
#
# The following StarLark would replace the `local_repository` rule mentioned above.
#
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# http_archive(
# name = "rules_python",
# sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
# strip_prefix = "rules_python-0.16.1",
# url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
# )

# We import the repository-local rules_python_gazelle_plugin version in order to
# be able to test development changes to the plugin.
local_repository(
name = "rules_python_gazelle_plugin",
path = "../../gazelle",
)

# When loading the gazelle plugin outside this repo, use the http_archive rule as follows:
#
#http_archive(
# name = "rules_python_gazelle_plugin",
# sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
# strip_prefix = "rules_python-0.16.1/gazelle",
# url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
#)

# Next we load the toolchain from rules_python.
load("@rules_python//python:repositories.bzl", "python_register_toolchains")

Expand Down
19 changes: 2 additions & 17 deletions gazelle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,8 @@ Follow the instructions at https://github.com/bazelbuild/bazel-gazelle#running-g
Next, we need to fetch the third-party Go libraries that the python extension
depends on.

Add this to your `WORKSPACE`:

```starlark
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "",
strip_prefix = "rules_python-0.17.0/gazelle",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.17.0.tar.gz",
)

# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.

load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```
See the installation `WORKSPACE` snippet on the Releases page:
https://github.com/bazelbuild/rules_python/releases

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