Skip to content

Commit

Permalink
[bazel] Fix local_archive to use a string instead of a label
Browse files Browse the repository at this point in the history
If one wants to use local_archive with a file path outside of
the repository, a label is not ideal because we cannot use
absolute file path (they will be interpreted as a target).
This makes local_archive (and therefore http_archive_or_local
with `local = ...`) essentially unusable.

Signed-off-by: Amaury Pouly <[email protected]>
  • Loading branch information
pamaury authored and cfrantz committed Sep 12, 2023
1 parent e9d62df commit 6a5abb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/local_archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _local_archive_impl(rctx):
local_archive = repository_rule(
implementation = _local_archive_impl,
attrs = {
"path": attr.label(doc = "Local path to the archive", allow_single_file = True, mandatory = True),
"path": attr.string(doc = "Local path to the archive", mandatory = True),
"strip_prefix": attr.string(doc = "Strip path prefixes when unarchiving"),
"build_file": attr.label(doc = "A file to use as a BUILD file for this repository", allow_single_file = True),
"build_file_content": attr.string(doc = "The content for the BUILD file for this repository"),
Expand Down

0 comments on commit 6a5abb3

Please sign in to comment.