From b7fc53c92a6edd10aa936a6fbe2d10d22c559c43 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 7 Oct 2023 23:29:35 -0700 Subject: [PATCH] dependencies.zig: omit modules without build.zig as deps --- src/main.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index df32783807..fe6f08a54d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4928,9 +4928,11 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi // The first one is a dummy package for the current project. continue; } + if (!f.has_build_zig) + continue; const m = try Package.Module.create(arena, .{ .root = try f.package_root.clone(arena), - .root_src_path = if (f.has_build_zig) Package.build_zig_basename else "", + .root_src_path = Package.build_zig_basename, }); const hash_cloned = try arena.dupe(u8, &hash); deps_mod.deps.putAssumeCapacityNoClobber(hash_cloned, m);