| ... | ... | @@ -4228,6 +4228,10 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4228 | 4228 | .root_src_path = "build_runner.zig", |
| 4229 | 4229 | }; |
| 4230 | 4230 | |
| 4231 | var build_pkg: Package = .{ |
| 4232 | .root_src_directory = build_directory, |
| 4233 | .root_src_path = build_zig_basename, |
| 4234 | }; |
| 4231 | 4235 | if (!build_options.omit_pkg_fetching_code) { |
| 4232 | 4236 | var http_client: std.http.Client = .{ .allocator = gpa }; |
| 4233 | 4237 | defer http_client.deinit(); |
| ... | ... | @@ -4249,7 +4253,8 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4249 | 4253 | |
| 4250 | 4254 | // Here we borrow main package's table and will replace it with a fresh |
| 4251 | 4255 | // one after this process completes. |
| 4252 | | main_pkg.fetchAndAddDependencies( |
| 4256 | build_pkg.fetchAndAddDependencies( |
| 4257 | &main_pkg, |
| 4253 | 4258 | arena, |
| 4254 | 4259 | &thread_pool, |
| 4255 | 4260 | &http_client, |
| ... | ... | @@ -4280,11 +4285,6 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4280 | 4285 | mem.swap(Package.Table, &main_pkg.table, &deps_pkg.table); |
| 4281 | 4286 | try main_pkg.add(gpa, "@dependencies", deps_pkg); |
| 4282 | 4287 | } |
| 4283 | | |
| 4284 | | var build_pkg: Package = .{ |
| 4285 | | .root_src_directory = build_directory, |
| 4286 | | .root_src_path = build_zig_basename, |
| 4287 | | }; |
| 4288 | 4288 | try main_pkg.add(gpa, "@build", &build_pkg); |
| 4289 | 4289 | |
| 4290 | 4290 | const comp = Compilation.create(gpa, .{ |