Closed Arxcis closed 2 years ago
Not relevant to the issue at hand, but why is zig failing?
Not relevant to the issue at hand, but why is zig failing?
Zig is failing in all 2020 tests, because I am running the tests with the 2021 docker image locally 😉 This is expected behaviour. The tests are NOT failing in the CI, because there they use the correct 2020 docker image.
Not relevant to the issue at hand, but why is zig failing?
@Avokadoen To literally answer your question, zig fails because I run make name=2020
with export DOCKER_TAG="jonasjso/adventofcode2020:2021-12-08-kill-java-and-kotlin"
$ make name=2020
docker run -ti -v /home/jonas/git/github.com/Arxcis/adventofcode2020:/aoc "jonasjso/adventofcode2020:2021-12-08-kill-java-and-kotlin" /bin/bash -c "cd /aoc && ./2020/test.sh && exit"
------------------------ 2020 ------------------------
--- Day 1: Report Repair ---
cat $INPUT | go day01.stektpotet.go 5ms ✅
cat $INPUT | go day01.tholok97.go 5ms ✅
cat $INPUT | gcc day01.c 8ms ✅
./zig_solution.zig:27:33: error: no member named 'inStream' in struct 'std.fs.file.File'
const in = std.io.getStdIn().inStream();
^
--- Day 2: Password Philosophy ---
cat $INPUT | go day02.stektpotet.go 3ms ✅
cat $INPUT | gcc day02.c 4ms ✅
/tmp/zig_solution.zig:29:17: error: unused capture
} else |err| {
^
--- Day 3: Counting trees ---
cat $INPUT | go day03.stektpotet.go 5ms ✅
cat $INPUT | go day03.tholok97.go 5ms ✅
cat $INPUT | gcc day03.c 4ms ✅
cat $INPUT | zig day03.zig 4ms ✅
cat $INPUT | polyc day03.sml 53ms ✅
cat $INPUT | python3 day03.klyve.py 26ms ✅
cat $INPUT | python3 day03.preng.py 20ms ✅
cat $INPUT | python3 one-liner.py 24ms ✅
cat $INPUT | deno day03.ts 36ms ✅
--- Day 4: Passport Processing ---
cat $INPUT | gcc day04.c 5ms ✅
/tmp/zig_solution.zig:124:5: error: unused while loop label
line_read: while (lines.next()) |line| {
^
--- Day 5: Boarding pass ---
cat $INPUT | go day05.stektpotet.go 5ms ✅
cat $INPUT | gcc day05.c 4ms ✅
/tmp/zig_solution.zig:52:5: error: 'comptime const' is redundant; instead wrap the initialization expression with 'comptime'
comptime const row_extractor = LineSegmentParser('F', 'B', 127);
^
--- Day 6: Custom customs ---
cat $INPUT | go day06.stektpotet.go 7ms ✅
cat $INPUT | go tholok97.go 8ms ✅
cat $INPUT | gcc day06.c 4ms ✅
./zig_solution.zig:64:29: error: expected type 'type', found '[]u8'
var it = mem.split(bytes[0..length], "\n\n");
^
--- Day 7: Handy Haversacks ---
/tmp/zig_solution.zig:102:11: error: unused local constant
const stderr = std.io.getStdErr().writer();
^
--- Day 8: Handheld Halting ---
/tmp/zig_solution.zig:123:21: error: unused capture
} else |err| {
^
--- Day 9: Encoding Error ---
/tmp/zig_solution.zig:32:13: error: unused local variable
var weakness: usize = 0;
^
--- Day 10: --- Adapter Combinations ---
cat $INPUT | python3 day10.preng.py 38ms ✅
cat $INPUT | python3 stektpotet.py 38ms ✅
cat $INPUT | deno day10.ts 70ms ✅
cat $INPUT | polyc day10.sml 71ms ✅
--- Day 11: --- Seating System ---
Fix #135
Demo zig compiler error
You can see that
day06.zig
does not have--> \d+ms ✅
at the end. This indicates thatday06.zig
was not able to pass the test.This new behaviour should be expected for both compiler and runtime errors.