Arxcis / adventofcode2020

Community-project solving https://adventofcode.com/ - problems, with Github CI, Docker and support for many languages.
6 stars 8 forks source link

2020 solutions in Zig fails to compile with 2021 docker image #147

Open Arxcis opened 2 years ago

Arxcis commented 2 years ago

TBD

Is this an easy / quick fix?

$ 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 ---
         go       day01.stektpotet.go      ⏱️  5ms        ✅
         go       day01.tholok97.go        ⏱️  5ms        ✅
         gcc      day01.c                  ⏱️  8ms        ✅
         zig      day01.zig                ⏱️  ./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 ---
         go       day02.stektpotet.go      ⏱️  4ms        ✅
         gcc      day02.c                  ⏱️  4ms        ✅
         zig      day02.zig                ⏱️  /tmp/zig_solution.zig:29:17: error: unused capture
        } else |err| {
                ^
--- Day 3: Counting trees ---
         go       day03.stektpotet.go      ⏱️  5ms        ✅
         go       day03.tholok97.go        ⏱️  5ms        ✅
         gcc      day03.c                  ⏱️  4ms        ✅
         zig      day03.zig                ⏱️  4ms        ✅
         polyc    day03.sml                ⏱️  29ms       ✅
         python3  day03.klyve.py           ⏱️  28ms       ✅
         python3  day03.preng.py           ⏱️  20ms       ✅
         python3  one-liner.py             ⏱️  25ms       ✅
         deno     day03.ts                 ⏱️  40ms       ✅
--- Day 4: Passport Processing ---
         gcc      day04.c                  ⏱️  5ms        ✅
         zig      day04.zig                ⏱️  /tmp/zig_solution.zig:124:5: error: unused while loop label
    line_read: while (lines.next()) |line| {
    ^
--- Day 5: Boarding pass ---
         go       day05.stektpotet.go      ⏱️  5ms        ✅
         gcc      day05.c                  ⏱️  5ms        ✅
         zig      day05.zig                ⏱️  /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 ---
         go       day06.stektpotet.go      ⏱️  7ms        ✅
         go       tholok97.go              ⏱️  8ms        ✅
         gcc      day06.c                  ⏱️  4ms        ✅
         zig      day06.zig                ⏱️  ./zig_solution.zig:64:29: error: expected type 'type', found '[]u8'
    var it = mem.split(bytes[0..length], "\n\n");
                            ^
--- Day 7: Handy Haversacks ---
         zig      day07.zig                ⏱️  /tmp/zig_solution.zig:102:11: error: unused local constant
    const stderr = std.io.getStdErr().writer();
          ^
--- Day 8: Handheld Halting ---
         zig      day08.zig                ⏱️  /tmp/zig_solution.zig:123:21: error: unused capture
            } else |err| {
                    ^
--- Day 9: Encoding Error ---
         zig      day09.zig                ⏱️  /tmp/zig_solution.zig:32:13: error: unused local variable
        var weakness: usize = 0;