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/toolchain_utils
1 result
Show changes
Commits on Source (6)
/.cache
/bazel-bin
/bazel-testlogs
/bazel-rules_toolchain
/bazel-out
/bazel-*
/.bazelrc.user
/node_modules
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:
......
# [1.0.0-beta.4](https://git.gitlab.arm.com/bazel/toolchain_utils/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2024-03-25)
### Bug Fixes
- **export.symlink:** support multiple identical exports ([07a9c2c](https://git.gitlab.arm.com/bazel/toolchain_utils/commit/07a9c2c832997967deaed6a8257789a03bf3450b))
# [1.0.0-beta.3](https://git.gitlab.arm.com/bazel/toolchain_utils/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2024-02-23)
### Features
......
module(
name = "toolchain_utils",
version = "1.0.0-beta.3",
version = "1.0.0-beta.4",
bazel_compatibility = [
">=7.0.0",
],
......
......@@ -5,6 +5,7 @@ module(
],
)
bazel_dep(name = "rules_diff", version = "1.0.0-alpha.3")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "toolchain_utils", version = "0.0.0")
local_path_override(
......@@ -72,4 +73,8 @@ export.symlink(
name = "export",
target = "@fixture",
)
export.symlink(
name = "export",
target = "@fixture",
)
use_repo(export, "export")
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 = "hello-world",
size = "small",
file1 = "@export//:test/fixture/hello-world.txt",
file2 = "//test/fixture:hello-world.txt",
a = "@export//:test/fixture/hello-world.txt",
b = "//test/fixture:hello-world.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 = "hello-world",
size = "small",
file1 = "@fixture//:test/fixture/hello-world.txt",
file2 = "//test/fixture:hello-world.txt",
a = "@fixture//:test/fixture/hello-world.txt",
b = "//test/fixture:hello-world.txt",
)
load("@toolchain_utils//toolchain/triplet:local.bzl", "TRIPLET")
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@rules_diff//diff/file/test:defs.bzl", "diff_file_test")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
write_file(
......@@ -8,9 +8,9 @@ write_file(
content = [TRIPLET.value],
)
diff_test(
diff_file_test(
name = "test",
size = "small",
file1 = ":expected",
file2 = "@toolchain_utils//toolchain/triplet:local",
a = ":expected",
b = "@toolchain_utils//toolchain/triplet:local",
)
......@@ -73,9 +73,21 @@ TAGS = {
}
def implementation(mctx):
symlinks = {}
for mod in mctx.modules:
for d in mod.tags.symlink:
_symlink(name = d.name, **{a: getattr(d, a) for a in _ATTRS})
for tag in mod.tags.symlink:
attrs = {a: getattr(tag, a) for a in _ATTRS}
if tag.name not in symlinks:
symlinks[tag.name] = (mod, attrs)
continue
m, a = symlinks[tag.name]
if a != attrs:
fail("`{}@{}` exports `{}` but it is already exported with different attributes by `{}@{}`".format(mod.name, mod.version or "<version>", tag.name, m.name, m.version or "<version>"))
for name, (_, attrs) in symlinks.items():
_symlink(name = name, **attrs)
export = module_extension(
doc = DOC,
......