mirror of
https://github.com/ziglang/zig.git
synced 2026-01-01 11:03:11 +00:00
fix dependencies.zig generation with no dependencies
This commit is contained in:
parent
8f20ce74f4
commit
7bae6d9064
@ -116,8 +116,11 @@ pub const JobQueue = struct {
|
||||
pub fn createDependenciesSource(jq: *JobQueue, buf: *std.ArrayList(u8)) Allocator.Error!void {
|
||||
const keys = jq.table.keys();
|
||||
|
||||
if (keys.len == 0)
|
||||
assert(keys.len != 0); // caller should have added the first one
|
||||
if (keys.len == 1) {
|
||||
// This is the first one. It must have no dependencies.
|
||||
return createEmptyDependenciesSource(buf);
|
||||
}
|
||||
|
||||
try buf.appendSlice("pub const packages = struct {\n");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user