Subject: [PATCH bazel-zig-cc 0/1] Fix the register parameter in register toolchain

From: ~laurynasl <[email-masked]>
Date: Fri, 08 Apr 2022 13:03:53 +0000

Looks like this slipped through the CI. We should think about how to
catch cases like these.

laurynasl (1):
  Fix register toolchain

 toolchain/defs.bzl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.34.1

---

From: ~laurynasl <[email-masked]>
Date: Fri, 08 Apr 2022 12:55:52 +0000

From: laurynasl <[email-masked]>

---

diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl
index ebcb65e..9e34e6b 100644
--- a/toolchain/defs.bzl
+++ b/toolchain/defs.bzl
@@ -65,7 +65,7 @@ def register_toolchains(
         },
     )
 
-    toolchains = ["@zig_sdk//:toolchain:%s" % t for t in register]
+    toolchains = ["@zig_sdk//toolchain:%s" % t for t in register]
     native.register_toolchains(*toolchains)
 
 ZIG_TOOL_WRAPPER = """#!/bin/bash
-- 
2.34.1

---

From: "builds.sr.ht" <[email-masked]>
Date: Fri, 08 Apr 2022 13:17:51 +0000

bazel-zig-cc/patches/.build.yml: SUCCESS in 13m56s

[Fix the register parameter in register toolchain][0] from [~laurynasl][1]

[0]: https://lists.sr.ht/~motiejus/bazel-zig-cc/patches/30909
[1]: mailto:[email-masked]

✓ #732421 SUCCESS bazel-zig-cc/patches/.build.yml https://builds.sr.ht/~motiejus/job/732421

---

From: Motiejus Jakštys <[email-masked]>
Date: Sat, 9 Apr 2022 00:15:38 +0300

> Looks like this slipped through the CI. We should think about how to

I think the next step, where you suggested replacing
`--extra_toolchains` with
registering-all-toolchains-and-specifying-the-platforms, would have
helped here?

Once transitioned to platforms, I expect us to stop specifying the
`--extra_toolchains` and only use platform constraints. Then write a
couple of test targets and confirm they are building artifacts for
correct architectures

Transitions can even allow `sh_test` targets, which would run `file` on
the output binary and assert it's architecture. The `ci/test` script
would become even simpler.

>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied and released v0.6.1. Thank you.

Motiejus