| ... | ... | @@ -12,10 +12,6 @@ top_level_steps: std.array_hash_map.String(Configuration.Step.Index), |
| 12 | 12 | path: std.Build.Cache.Path, |
| 13 | 13 | |
| 14 | 14 | pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void { |
| 15 | | std.log.err("TODO also print paths", .{}); |
| 16 | | std.log.err("TODO also print unlazy deps", .{}); |
| 17 | | std.log.err("TODO also print system integrations", .{}); |
| 18 | | std.log.err("TODO also print available options", .{}); |
| 19 | 15 | const c = &sc.configuration; |
| 20 | 16 | var serializer: Serializer = .{ .writer = w }; |
| 21 | 17 | var s = try serializer.beginStruct(.{}); |
| ... | ... | @@ -45,6 +41,48 @@ pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void { |
| 45 | 41 | try tf.end(); |
| 46 | 42 | } |
| 47 | 43 | |
| 44 | { |
| 45 | var tf = try s.beginTupleField("path_deps", .{}); |
| 46 | for (c.path_deps_base, c.path_deps_sub) |base, sub| { |
| 47 | var sf = try tf.beginStructField(.{}); |
| 48 | try sf.field("base", @tagName(base), .{}); |
| 49 | try sf.field("sub", sub.slice(c), .{}); |
| 50 | try sf.end(); |
| 51 | } |
| 52 | try tf.end(); |
| 53 | } |
| 54 | |
| 55 | { |
| 56 | var tf = try s.beginTupleField("unlazy_deps", .{}); |
| 57 | for (c.unlazy_deps) |dep| { |
| 58 | try tf.field(dep.slice(c), .{}); |
| 59 | } |
| 60 | try tf.end(); |
| 61 | } |
| 62 | |
| 63 | { |
| 64 | var tf = try s.beginTupleField("system_integrations", .{}); |
| 65 | for (c.system_integrations) |opt| { |
| 66 | var sf = try tf.beginStructField(.{}); |
| 67 | try sf.field("name", opt.name.slice(c), .{}); |
| 68 | try sf.field("status", opt.status, .{}); |
| 69 | try sf.end(); |
| 70 | } |
| 71 | try tf.end(); |
| 72 | } |
| 73 | |
| 74 | { |
| 75 | var tf = try s.beginTupleField("available_options", .{}); |
| 76 | for (c.available_options) |opt| { |
| 77 | var sf = try tf.beginStructField(.{}); |
| 78 | try sf.field("name", opt.name.slice(c), .{}); |
| 79 | try sf.field("description", opt.description.slice(c), .{}); |
| 80 | try sf.field("type", @tagName(opt.type), .{}); |
| 81 | try sf.end(); |
| 82 | } |
| 83 | try tf.end(); |
| 84 | } |
| 85 | |
| 48 | 86 | try s.end(); |
| 49 | 87 | } |
| 50 | 88 | |