Skip to content

Commit

Permalink
Revert "Add comment referring to bazelbuild/bazel#24829"
Browse files Browse the repository at this point in the history
This reverts commit 61c3f7c.

This comment is wrong, see https://groups.google.com/g/bazel-discuss/c/vGWAMaziGCU/m/bt5Uu7TDAQAJ:

    Module extensions aren't meant to replace repository rules - in fact, module extensions can create repositories only
    by instantiating repository rules. The files created by a module extension's implementation function are only kept in a
    temporary location. It is thus both perfectly fine and necessary to continue to use repository rules and orchestrate
    them via module extensions.
  • Loading branch information
phst committed Jan 5, 2025
1 parent 998bcee commit f243ee0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions elisp/extensions.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023, 2024, 2025 Google LLC
# Copyright 2023, 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,7 +70,7 @@ def _elisp_http_archive_impl(ctx):
"""Implementation of the `elisp_http_archive` repository rule."""
ctx.download_and_extract(
url = ctx.attr.urls,
integrity = ctx.attr.integrity,
integrity = ctx.attr.integrity or fail("missing archive checksum"),
stripPrefix = ctx.attr.strip_prefix,
)
ctx.template(
Expand All @@ -84,9 +84,6 @@ def _elisp_http_archive_impl(ctx):
executable = False,
)

# FIXME: Remove this rule and inline its implementation once
# https://github.com/bazelbuild/bazel/issues/24829 is fixed in all supported
# versions of Bazel.
_elisp_http_archive = repository_rule(
doc = _HTTP_ARCHIVE_DOC.format(kind = "repository rule"),
attrs = _HTTP_ARCHIVE_ATTRS | {
Expand All @@ -102,7 +99,7 @@ def _elisp_impl(ctx):
_elisp_http_archive(
name = arch.name,
urls = arch.urls,
integrity = arch.integrity or fail("missing archive checksum"),
integrity = arch.integrity,
strip_prefix = arch.strip_prefix,
target_name = arch.target_name,
exclude = arch.exclude,
Expand Down
2 changes: 1 addition & 1 deletion examples/ext/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f243ee0

Please sign in to comment.