Skip to content

Commit aa53fe7

Browse files
committed
add dependent modules regardless of whether a runner was specified
1 parent f01833e commit aa53fe7

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

src/main.zig

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,8 +3038,8 @@ fn buildOutputType(
30383038
};
30393039

30403040
const root_mod = if (arg_mode == .zig_test) root_mod: {
3041-
const test_mod = if (test_runner_path) |test_runner| test_mod: {
3042-
const test_mod = try Package.Module.create(arena, .{
3041+
const test_mod = if (test_runner_path) |test_runner|
3042+
try Package.Module.create(arena, .{
30433043
.global_cache_directory = global_cache_directory,
30443044
.paths = .{
30453045
.root = .{
@@ -3055,27 +3055,26 @@ fn buildOutputType(
30553055
.parent = main_mod,
30563056
.builtin_mod = main_mod.getBuiltinDependency(),
30573057
.builtin_modules = null, // `builtin_mod` is specified
3058-
});
3059-
test_mod.deps = try main_mod.deps.clone(arena);
3060-
break :test_mod test_mod;
3061-
} else try Package.Module.create(arena, .{
3062-
.global_cache_directory = global_cache_directory,
3063-
.paths = .{
3064-
.root = .{
3065-
.root_dir = zig_lib_directory,
3066-
.sub_path = "compiler",
3058+
})
3059+
else
3060+
try Package.Module.create(arena, .{
3061+
.global_cache_directory = global_cache_directory,
3062+
.paths = .{
3063+
.root = .{
3064+
.root_dir = zig_lib_directory,
3065+
.sub_path = "compiler",
3066+
},
3067+
.root_src_path = "test_runner.zig",
30673068
},
3068-
.root_src_path = "test_runner.zig",
3069-
},
3070-
.fully_qualified_name = "root",
3071-
.cc_argv = &.{},
3072-
.inherited = .{},
3073-
.global = create_module.resolved_options,
3074-
.parent = main_mod,
3075-
.builtin_mod = main_mod.getBuiltinDependency(),
3076-
.builtin_modules = null, // `builtin_mod` is specified
3077-
});
3078-
3069+
.fully_qualified_name = "root",
3070+
.cc_argv = &.{},
3071+
.inherited = .{},
3072+
.global = create_module.resolved_options,
3073+
.parent = main_mod,
3074+
.builtin_mod = main_mod.getBuiltinDependency(),
3075+
.builtin_modules = null, // `builtin_mod` is specified
3076+
});
3077+
test_mod.deps = try main_mod.deps.clone(arena);
30793078
break :root_mod test_mod;
30803079
} else main_mod;
30813080

0 commit comments

Comments
 (0)