aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-10-09 10:19:34 -0400
committerDave Gauer <dave@ratfactor.com>2021-10-09 10:19:34 -0400
commit0ba79fe8699762f57cc87cc3300cc078b9a78c8f (patch)
treeb450c0ac968088398582c3bc22a7b0ab66f21c42
parentcd2f9b8007ae4ff78a116e051aca5aa80b3affa9 (diff)
Updated for dev pre-release build v0.9.0-dev.1343
A change in the "build" library imports and some cleanup in the patches.
-rw-r--r--build.zig7
-rw-r--r--patches/patches/024_errors4.patch2
-rw-r--r--patches/patches/033_iferror.patch2
3 files changed, 6 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 80e7c00..1cc63eb 100644
--- a/build.zig
+++ b/build.zig
@@ -1,4 +1,5 @@
const std = @import("std");
+const builtin = @import("builtin");
const Builder = std.build.Builder;
const Step = std.build.Step;
const assert = std.debug.assert;
@@ -447,11 +448,11 @@ const exercises = [_]Exercise{
/// Check the zig version to make sure it can compile the examples properly.
/// This will compile with Zig 0.6.0 and later.
fn checkVersion() bool {
- if (!@hasDecl(std.builtin, "zig_version")) {
+ if (!@hasDecl(builtin, "zig_version")) {
return false;
}
- const version = std.builtin.zig_version;
+ const version = builtin.zig_version;
const order = version.order(needed_version);
return order != .lt;
}
@@ -490,7 +491,7 @@ pub fn build(b: *Builder) void {
.auto => {
if (std.io.getStdErr().supportsAnsiEscapeCodes()) {
use_color_escapes = true;
- } else if (std.builtin.os.tag == .windows) {
+ } else if (builtin.os.tag == .windows) {
const w32 = struct {
const WINAPI = std.os.windows.WINAPI;
const DWORD = std.os.windows.DWORD;
diff --git a/patches/patches/024_errors4.patch b/patches/patches/024_errors4.patch
index 5d7fb1c..5996a99 100644
--- a/patches/patches/024_errors4.patch
+++ b/patches/patches/024_errors4.patch
@@ -1,5 +1,5 @@
62c62,68
-< return detectProblems(n) ???
+< return detectProblems(n) ???;
---
> return detectProblems(n) catch |err| {
> if (err == MyNumberError.TooSmall) {
diff --git a/patches/patches/033_iferror.patch b/patches/patches/033_iferror.patch
index a1db7b8..8433e8a 100644
--- a/patches/patches/033_iferror.patch
+++ b/patches/patches/033_iferror.patch
@@ -1,2 +1,2 @@
-35a36
+41a42
> MyNumberError.TooSmall => std.debug.print("<4. ", .{}),