Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bazel/download_utils
1 result
Show changes
Commits on Source (6)
Showing
with 25750 additions and 645 deletions
include:
- component: "${CI_SERVER_HOST}/ci/component/bazelisk/bazelisk@v1.0.0-beta.2"
- component: "${CI_SERVER_HOST}/ci/component/bazelisk/bazelisk@v1.0.0-beta.3"
default:
tags:
......
load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")
diff_file_test(
name = "placeholder",
a = "WORKSPACE",
b = "WORKSPACE",
size = "small",
)
# [1.0.0-beta.2](https://git.gitlab.arm.com/bazel/download_utils/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2024-03-12)
### Bug Fixes
- embed download data into `WORKSPACE` to fix cache invalidation ([e475caf](https://git.gitlab.arm.com/bazel/download_utils/commit/e475cafa5535e39e87b71179bfd36213c9ff365a))
# 1.0.0-beta.1 (2024-02-13)
### Bug Fixes
......
module(
name = "download_utils",
version = "1.0.0-beta.1",
version = "1.0.0-beta.2",
bazel_compatibility = [
">=7.0.0",
],
compatibility_level = 1,
)
bazel_dep(name = "bazel_skylib", version = "1.4.2", dev_dependency = True)
bazel_dep(name = "rules_diff", version = "1.0.0-alpha.3", dev_dependency = True)
This diff is collapsed.
......@@ -84,6 +84,12 @@ Symlinks/hardlinks can be created in the download repositories by providing the
[commands]: lib/commands.bzl
[e2e]: e2e/MODULE.bazel
## Hermeticity
This ruleset is entirely hermetic and does not require anything from the system.
The `commands` supports `$(location <label>)` for running hermetic commands on the downloaded data.
## Release Registry
The project publishes the relevant files to GitLab releases for use when a version has not been added to the upstream [BCR][bcr].
......
......@@ -3,6 +3,7 @@ load("//lib:download_and_extract.bzl", "download_and_extract", _DOWNLOAD_AND_EXT
load("//lib:patch.bzl", "patch", _PATCH = "ATTRS")
load("//lib:build.bzl", "build", _BUILD = "ATTRS")
load("//lib:links.bzl", "links", _LINKS = "ATTRS")
load("//lib:workspace.bzl", "write")
visibility("//download/...")
......@@ -33,7 +34,7 @@ def implementation(rctx):
canonical |= links(rctx)
canonical |= commands(rctx)
return canonical
return write(rctx, canonical)
archive = repository_rule(
doc = DOC,
......
......@@ -3,6 +3,7 @@ load("//lib:download_and_extract.bzl", "download_and_extract", _DOWNLOAD_AND_EXT
load("//lib:patch.bzl", "patch", _PATCH = "ATTRS")
load("//lib:build.bzl", "build", _BUILD = "ATTRS")
load("//lib:links.bzl", "links", _LINKS = "ATTRS")
load("//lib:workspace.bzl", "write")
visibility("//download/...")
......@@ -31,7 +32,7 @@ def implementation(rctx):
canonical |= links(rctx)
canonical |= commands(rctx)
return canonical
return write(rctx, canonical)
deb = repository_rule(
doc = DOC,
......
......@@ -3,6 +3,7 @@ load("//lib:download.bzl", "download", _DOWNLOAD = "ATTRS")
load("//lib:patch.bzl", "patch", _PATCH = "ATTRS")
load("//lib:build.bzl", "build", _BUILD = "ATTRS")
load("//lib:links.bzl", "links", _LINKS = "ATTRS")
load("//lib:workspace.bzl", "write")
visibility("//download/...")
......@@ -35,7 +36,7 @@ def implementation(rctx):
canonical |= links(rctx)
canonical |= commands(rctx)
return canonical
return write(rctx, canonical)
file = repository_rule(
doc = DOC,
......
......@@ -11,7 +11,8 @@ local_path_override(
path = "..",
)
bazel_dep(name = "toolchain_utils", version = "1.0.0-alpha.16")
bazel_dep(name = "rules_diff", version = "1.0.0-alpha.3")
bazel_dep(name = "toolchain_utils", version = "1.0.0-beta.3")
archive = use_repo_rule("@download_utils//download/archive:defs.bzl", "download_archive")
......
This diff is collapsed.
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")
diff_test(
diff_file_test(
name = "fixture",
size = "small",
file1 = "@archive//:fixture.txt",
file2 = ":fixture.txt",
a = "@archive//:fixture.txt",
b = ":fixture.txt",
)
diff_test(
diff_file_test(
name = "symlink",
size = "small",
file1 = "@archive//:symlink.txt",
file2 = ":fixture.txt",
a = "@archive//:symlink.txt",
b = ":fixture.txt",
)
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")
diff_test(
diff_file_test(
name = "fixture",
size = "small",
file1 = "@deb//:etc/test/fixture.txt",
file2 = ":fixture.txt",
a = "@deb//:etc/test/fixture.txt",
b = ":fixture.txt",
)
diff_test(
diff_file_test(
name = "symlink",
size = "small",
file1 = "@deb//:symlink.txt",
file2 = ":fixture.txt",
a = "@deb//:symlink.txt",
b = ":fixture.txt",
)
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")
diff_test(
diff_file_test(
name = "fixture",
size = "small",
file1 = "@file//:fixture.txt",
file2 = ":fixture.txt",
a = "@file//:fixture.txt",
b = ":fixture.txt",
)
visibility("//lib/...")
visibility("//...")
def workspace(rctx):
"""
......@@ -16,3 +16,15 @@ def workspace(rctx):
break
root = root.dirname
return str(rctx.workspace_root).replace(str(root), "/")
def write(rctx, canonical):
"""
Generate a `WORKSPACE` file that is stamped with the canonical arguments.
Args:
rctx: The download repository context.
canonical: The final canonical arguments
"""
rctx.file("WORKSPACE", "# {}".format(canonical), executable=False)
return canonical
load("//placeholder/test:rule.bzl", "placeholder_test")
placeholder_test(
name = "placeholder",
size = "small",
)
Hello, world!
exports_files(["posix.tmpl.sh"])
load(":rule.bzl", _test = "test")
visibility("public")
placeholder_test = _test
#! /bin/sh
# Strict shell
set -o errexit -o nounset
# Bazel substitutions
CODE="{{code}}"
readonly CODE
# Simple!
exit "${CODE}"