Skip to content

Commit 8caff98

Browse files
committed
refactor: uncouple gazelle plugin from rules_python itself
1 parent 89fedb7 commit 8caff98

3 files changed

Lines changed: 29 additions & 29 deletions

File tree

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ filegroup(
4545
"version.bzl",
4646
"//python:distribution",
4747
"//tools:distribution",
48-
"@rules_python_gazelle_plugin//:distribution",
48+
##"@rules_python_gazelle_plugin//:distribution",
4949
],
5050
visibility = [
5151
"//:__subpackages__",

MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ bazel_dep(name = "another_module", version = "0", dev_dependency = True)
227227
# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
228228
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
229229
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
230-
bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True)
231-
bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle")
230+
##bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True)
231+
##bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle")
232232

233233
internal_dev_deps = use_extension(
234234
"//python/private:internal_dev_deps.bzl",
@@ -260,10 +260,10 @@ dev_rules_python_config.add_transition_setting(
260260

261261
# Add gazelle plugin so that we can run the gazelle example as an e2e integration
262262
# test and include the distribution files.
263-
local_path_override(
264-
module_name = "rules_python_gazelle_plugin",
265-
path = "gazelle",
266-
)
263+
##local_path_override(
264+
## module_name = "rules_python_gazelle_plugin",
265+
## path = "gazelle",
266+
##)
267267

268268
local_path_override(
269269
module_name = "other",

tests/integration/BUILD.bazel

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ _WORKSPACE_FLAGS = [
2323
"--enable_workspace",
2424
]
2525

26-
_WORKSPACE_GAZELLE_PLUGIN_FLAGS = [
27-
"--override_repository=rules_python_gazelle_plugin=../../../rules_python_gazelle_plugin",
28-
]
26+
##_WORKSPACE_GAZELLE_PLUGIN_FLAGS = [
27+
## "--override_repository=rules_python_gazelle_plugin=../../../rules_python_gazelle_plugin",
28+
##]
2929

30-
_GAZELLE_PLUGIN_FLAGS = [
31-
"--override_module=rules_python_gazelle_plugin=../../../rules_python_gazelle_plugin",
32-
]
30+
##_GAZELLE_PLUGIN_FLAGS = [
31+
## "--override_module=rules_python_gazelle_plugin=../../../rules_python_gazelle_plugin",
32+
##]
3333

3434
default_test_runner(
3535
name = "workspace_test_runner",
@@ -40,28 +40,28 @@ default_test_runner(
4040
visibility = ["//visibility:public"],
4141
)
4242

43-
default_test_runner(
44-
name = "workspace_test_runner_gazelle_plugin",
45-
bazel_cmds = [
46-
"info {}".format(" ".join(_WORKSPACE_FLAGS + _WORKSPACE_GAZELLE_PLUGIN_FLAGS)),
47-
"test {} //...".format(" ".join(_WORKSPACE_FLAGS + _WORKSPACE_GAZELLE_PLUGIN_FLAGS)),
48-
],
49-
visibility = ["//visibility:public"],
50-
)
43+
##default_test_runner(
44+
## name = "workspace_test_runner_gazelle_plugin",
45+
## bazel_cmds = [
46+
## "info {}".format(" ".join(_WORKSPACE_FLAGS + _WORKSPACE_GAZELLE_PLUGIN_FLAGS)),
47+
## "test {} //...".format(" ".join(_WORKSPACE_FLAGS + _WORKSPACE_GAZELLE_PLUGIN_FLAGS)),
48+
## ],
49+
## visibility = ["//visibility:public"],
50+
##)
5151

5252
default_test_runner(
5353
name = "test_runner",
5454
visibility = ["//visibility:public"],
5555
)
5656

57-
default_test_runner(
58-
name = "test_runner_gazelle_plugin",
59-
bazel_cmds = [
60-
"info {}".format(" ".join(_GAZELLE_PLUGIN_FLAGS)),
61-
"test {} //...".format(" ".join(_GAZELLE_PLUGIN_FLAGS)),
62-
],
63-
visibility = ["//visibility:public"],
64-
)
57+
##default_test_runner(
58+
## name = "test_runner_gazelle_plugin",
59+
## bazel_cmds = [
60+
## "info {}".format(" ".join(_GAZELLE_PLUGIN_FLAGS)),
61+
## "test {} //...".format(" ".join(_GAZELLE_PLUGIN_FLAGS)),
62+
## ],
63+
## visibility = ["//visibility:public"],
64+
##)
6565

6666
# TODO: add compile_pip_requirements_test_from_external_repo
6767

0 commit comments

Comments
 (0)