mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-09-20 14:45:36 +00:00
Merge pull request 'Switched to new reader' (#305) from i304 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/305
This commit is contained in:
commit
62ad50b71e
|
@ -86,6 +86,7 @@ that if you update one, you may need to also update the other.
|
||||||
|
|
||||||
### Version Changes
|
### Version Changes
|
||||||
|
|
||||||
|
* *2025-09-03* zig 0.16.0-dev.164 - changes in reader, see [#25077](https://github.com/ziglang/zig/pull/25077)
|
||||||
* *2025-08-15* zig 0.15.0-dev.1519 - changes in array list, see [#24801](https://github.com/ziglang/zig/pull/24801)
|
* *2025-08-15* zig 0.15.0-dev.1519 - changes in array list, see [#24801](https://github.com/ziglang/zig/pull/24801)
|
||||||
* *2025-08-08* zig 0.15.0-dev.1380 - changes in build system, see [#24588](https://github.com/ziglang/zig/pull/24588)
|
* *2025-08-08* zig 0.15.0-dev.1380 - changes in build system, see [#24588](https://github.com/ziglang/zig/pull/24588)
|
||||||
* *2025-07-22* zig 0.15.0-dev.1092 - various changes due to new I/O API, see [#24488](https://github.com/ziglang/zig/pull/24488)
|
* *2025-07-22* zig 0.15.0-dev.1092 - various changes due to new I/O API, see [#24488](https://github.com/ziglang/zig/pull/24488)
|
||||||
|
|
10
build.zig
10
build.zig
|
@ -15,7 +15,7 @@ const print = std.debug.print;
|
||||||
// 1) Getting Started
|
// 1) Getting Started
|
||||||
// 2) Version Changes
|
// 2) Version Changes
|
||||||
comptime {
|
comptime {
|
||||||
const required_zig = "0.15.0-dev.1519";
|
const required_zig = "0.16.0-dev.164";
|
||||||
const current_zig = builtin.zig_version;
|
const current_zig = builtin.zig_version;
|
||||||
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
|
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
|
||||||
if (current_zig.order(min_zig) == .lt) {
|
if (current_zig.order(min_zig) == .lt) {
|
||||||
|
@ -276,8 +276,12 @@ pub fn build(b: *Build) !void {
|
||||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
defer _ = gpa.deinit();
|
defer _ = gpa.deinit();
|
||||||
const allocator = gpa.allocator();
|
const allocator = gpa.allocator();
|
||||||
const contents = try progress_file.readToEndAlloc(allocator, progress_file_size);
|
const contents = try allocator.alloc(u8, progress_file_size);
|
||||||
defer allocator.free(contents);
|
defer allocator.free(contents);
|
||||||
|
const bytes_read = try progress_file.read(contents);
|
||||||
|
if (bytes_read != progress_file_size) {
|
||||||
|
return error.UnexpectedEOF;
|
||||||
|
}
|
||||||
|
|
||||||
starting_exercise = try std.fmt.parseInt(u32, contents, 10);
|
starting_exercise = try std.fmt.parseInt(u32, contents, 10);
|
||||||
} else |err| {
|
} else |err| {
|
||||||
|
@ -566,7 +570,7 @@ const ZiglingStep = struct {
|
||||||
|
|
||||||
// Render compile errors at the bottom of the terminal.
|
// Render compile errors at the bottom of the terminal.
|
||||||
// TODO: use the same ttyconf from the builder.
|
// TODO: use the same ttyconf from the builder.
|
||||||
const ttyconf: std.io.tty.Config = if (use_color_escapes)
|
const ttyconf: std.Io.tty.Config = if (use_color_escapes)
|
||||||
.escape_codes
|
.escape_codes
|
||||||
else
|
else
|
||||||
.no_color;
|
.no_color;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user