Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

bazel: updates for hermetic_cc_toolchain + zig bump #59333

Merged
merged 5 commits into from
Jan 8, 2024
Merged

Conversation

Strum355
Copy link
Contributor

@Strum355 Strum355 commented Jan 4, 2024

Changes:

  • Bumps hermetic_cc_toolchain to v2.1.3 for macOS specific fixes
  • Removed now-unused incompat-zig-linux-amd64 bazel config
  • Removed now-true-by-default in bazel7 --incompatible_enable_cc_toolchain_resolution
  • Added --sandbox_add_mount_pair=/tmp to darwin-docker bazel config as recommended for hermetic_cc_toolchain
  • Bumps glibc version used in darwin-docker config to be closer to the version in our wolfi images
    • zig 0.11.0 (and by extension, hermetic_cc_toolchain) only supports up to 2.34, while wolfi images use 2.37. This is close enough to be fine, an improvement over cross-compiling for 2.31
  • Bumps zig to 0.12.0-dev build to fix occasional flakiness
  • Brings rust-toolchains.toml in-line again with WORKSPACE

Test plan

  • bazel build //docker-images/syntax-highlighter:syntect_server --config=darwin-docker with various combinations of bazel clean, bazel clean --expunge and rm -rf /tmp/zig-cache
  • bazel test //docker-images/syntax-highlighter:image_test --config=darwin-docker

@Strum355 Strum355 added the bazel label Jan 4, 2024
@Strum355 Strum355 requested a review from a team January 4, 2024 18:51
@Strum355 Strum355 self-assigned this Jan 4, 2024
@cla-bot cla-bot bot added the cla-signed label Jan 4, 2024
@Strum355 Strum355 changed the title bazel: updates for hermetic_cc_toolchain flakiness bazel: updates for hermetic_cc_toolchain + zig bump Jan 4, 2024
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Jan 4, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff fffe80d...66c498b.

Notify File(s)
@varungandhi-src docker-images/syntax-highlighter/rust-toolchain.toml

Comment on lines +1 to +22
diff --git a/toolchain/zig-wrapper.zig b/toolchain/zig-wrapper.zig
index 4a0fab4..8a740f7 100644
--- a/toolchain/zig-wrapper.zig
+++ b/toolchain/zig-wrapper.zig
@@ -328,7 +328,7 @@ test "zig-wrapper:parseArgs" {
// not using testing.allocator, because parseArgs is designed to be used
// with an arena.
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
- var allocator = gpa.allocator();
+ const allocator = gpa.allocator();

const tests = [_]struct {
args: []const [:0]const u8,
@@ -428,7 +428,7 @@ test "zig-wrapper:parseArgs" {
try tmp.dir.makePath(dir);

var argv_it = TestArgIterator{ .argv = tt.args };
- var res = try parseArgs(allocator, tmp.dir, &argv_it);
+ const res = try parseArgs(allocator, tmp.dir, &argv_it);

switch (tt.want_result) {
.err => |want_msg| try testing.expectEqualStrings(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a git diff/patch in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is uber/hermetic_cc_toolchain#140, hence "pr140"

@Strum355 Strum355 enabled auto-merge (squash) January 8, 2024 17:04
@Strum355 Strum355 merged commit 0c253a8 into main Jan 8, 2024
9 checks passed
@Strum355 Strum355 deleted the nsc/hermetic-cc-fix branch January 8, 2024 17:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants