You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project created with zig init, with the following build.zig:
conststd=@import("std");
pubfnbuild(b: *std.Build) void {
consttarget=b.standardTargetOptions(.{});
constconfig=b.addConfigHeader(.{}, .{});
constmodule=b.addModule("module", .{
.root_source_file=b.path("src/root.zig"),
});
module.addConfigHeader(config);
constexe=b.addExecutable(.{
.name="issue",
.root_source_file=b.path("src/main.zig"),
.target=target,
});
exe.root_module.addImport("module", module);
// Uncommenting the following line bypasses the issue// exe.step.dependOn(&config.step);b.installArtifact(exe);
}
Result:
thread 5968 panic: getPath() was called on a GeneratedFile that wasn't built yet. Is there a missing Step dependency on step 'configure blank header to config.h'?
Expected Behavior
Importing a Module with a ConfigHeader should set a dependency to that ConfigHeader's step.
Packages that use that Module are not able to set a dependency to the ConfigHeader step manually.
The text was updated successfully, but these errors were encountered:
Lzard
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Jun 16, 2024
Zig Version
0.14.0-dev.41+8f27a4370
Steps to Reproduce and Observed Behavior
In a project created with
zig init
, with the followingbuild.zig
:Result:
Expected Behavior
Importing a Module with a ConfigHeader should set a dependency to that ConfigHeader's step.
Packages that use that Module are not able to set a dependency to the ConfigHeader step manually.
The text was updated successfully, but these errors were encountered: