Skip to content

Commit

Permalink
Avoid emitting canonical labels into repo rules
Browse files Browse the repository at this point in the history
As long as bazelbuild#20722 isn't resolved, the canonical name for the given
apparent name can change without the repo rule being refetched.
  • Loading branch information
fmeum committed Jan 9, 2024
1 parent e7a0086 commit fb8f3ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions tools/build_defs/repo/http.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ def _http_file_impl(ctx):
return _update_integrity_attr(ctx, _http_file_attrs, download_info)

_HTTP_JAR_BUILD = """\
load("{rules_java_defs}", "java_import")
package(default_visibility = ["//visibility:public"])
java_import(
Expand Down Expand Up @@ -226,7 +224,6 @@ def _http_jar_impl(ctx):
ctx.file("WORKSPACE", "workspace(name = \"{name}\")".format(name = ctx.name))
ctx.file("jar/BUILD", _HTTP_JAR_BUILD.format(
file_name = downloaded_file_name,
rules_java_defs = str(Label("@rules_java//java:defs.bzl")),
))

return _update_integrity_attr(ctx, _http_jar_attrs, download_info)
Expand Down
5 changes: 0 additions & 5 deletions tools/build_defs/repo/jvm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ def jvm_maven_import_external(
srcjar_urls = kwargs.pop("srcjar_urls", None)

rule_name = kwargs.pop("rule_name", "java_import")
rules_java_defs = str(Label("@rules_java//java:defs.bzl"))
rule_load = kwargs.pop(
"rule_load",
'load("{}", "java_import")'.format(rules_java_defs),
)

if fetch_sources:
src_coordinates = struct(
Expand Down

0 comments on commit fb8f3ca

Please sign in to comment.