Skip to content

update translate-c to work recursively and fix bug where calling getGraph would cache too early (outside of "make" step)#94

Merged
silbinarywolf merged 1 commit intomainfrom
fix/resolve-translate-c-for-recursive-dep-and-fix-cached-graph-bug
Apr 30, 2026
Merged

update translate-c to work recursively and fix bug where calling getGraph would cache too early (outside of "make" step)#94
silbinarywolf merged 1 commit intomainfrom
fix/resolve-translate-c-for-recursive-dep-and-fix-cached-graph-bug

Conversation

@silbinarywolf
Copy link
Copy Markdown
Owner

@silbinarywolf silbinarywolf commented Apr 30, 2026

Changelog

  • update translate-c to work recursively
  • fix bug where calling getGraph would cache too early (outside of "make" step)

The bug with getGraph could cause the following crash:

thread 68890 panic: attempt to use null value
/home/jae/Tools/zig/current/lib/std/Build/Step/Compile.zig:1309:88: 0x142802c in getZigArgs (std.zig)
                        const import_index = cli_named_modules.modules.getIndex(import).?;
                                                                                       ^
/home/jae/Tools/zig/current/lib/std/Build/Step/Compile.zig:1787:36: 0x15e259f in make (std.zig)
    const zig_args = try getZigArgs(compile, false);
                                   ^
/home/jae/Tools/zig/current/lib/std/Build/Step.zig:278:33: 0x148cdbf in make (std.zig)
    const make_result = s.makeFn(s, options);
                                ^
/home/jae/Tools/zig/current/lib/compiler/build_runner.zig:1345:26: 0x148adfe in makeStep (build_runner.zig)
        } else if (s.make(.{
                         ^
/home/jae/Tools/zig/current/lib/std/Io.zig:1245:17: 0x148aa25 in start (std.zig)
                _ = @as(Cancelable!void, @call(.auto, function, args_casted.*)) catch {};
                ^
/home/jae/Tools/zig/current/lib/std/Io/Threaded.zig:552:22: 0x124b165 in start (std.zig)
            task.func(task.contextPointer());
                     ^
/home/jae/Tools/zig/current/lib/std/Io/Threaded.zig:1797:29: 0x1249364 in worker (std.zig)
            runnable.startFn(runnable, &thread, t);
                            ^
/home/jae/Tools/zig/current/lib/std/Thread.zig:422:13: 0x1249045 in callFn__anon_27841 (std.zig)
            @call(.auto, f, args);
            ^
/home/jae/Tools/zig/current/lib/std/Thread.zig:1431:30: 0x1248e00 in entryFn (std.zig)
                return callFn(f, self.fn_args);
                             ^
/home/jae/Tools/zig/current/lib/std/os/linux/x86_64.zig:105:5

Fixes #91

…e" step) and resolve "android_builtin" logic recursively
@silbinarywolf silbinarywolf merged commit 6221f98 into main Apr 30, 2026
11 checks passed
@silbinarywolf silbinarywolf deleted the fix/resolve-translate-c-for-recursive-dep-and-fix-cached-graph-bug branch April 30, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursively search for TranslateC steps

1 participant