Skip to content

Updating build.zig to support new API change. #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const print = std.debug.print;
// When changing this version, be sure to also update README.md in two places:
// 1) Getting Started
// 2) Version Changes
const needed_version = std.SemanticVersion.parse("0.11.0-dev.1501") catch unreachable;
const needed_version = std.SemanticVersion.parse("0.11.0-dev.1568") catch unreachable;

const Exercise = struct {
/// main_file must have the format key_name.zig.
Expand Down Expand Up @@ -564,7 +564,11 @@ pub fn build(b: *Builder) void {
const file_path = std.fs.path.join(b.allocator, &[_][]const u8{
if (use_healed) "patches/healed" else "exercises", ex.main_file,
}) catch unreachable;
const build_step = b.addExecutable(base_name, file_path);
const build_step = b.addExecutable(.{
.name = base_name,
.root_source_file = .{ .path = file_path }
});

build_step.install();

const verify_step = ZiglingStep.create(b, ex, use_healed);
Expand Down