@@ -4229,85 +4229,11 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
4229
4229
}
4230
4230
4231
4231
if (comp .digest ) | digest | {
4232
- // var digest: [Cache.bin_digest_len]u8 = undefined;
4233
- // _ = std.fmt.hexToBytes(&digest, &hex_digest) catch unreachable;
4234
- // std.debug.print("sending digest: {*} {s} {}\n", .{ comp, &hex_digest, std.fmt.fmtSliceHexLower(&digest) });
4235
4232
try s .serveEmitDigest (& digest , .{
4236
4233
.flags = .{ .cache_hit = comp .last_update_was_cache_hit },
4237
4234
});
4238
4235
}
4239
4236
4240
- // This logic is counter-intuitive because the protocol accounts for each
4241
- // emitted artifact possibly being in a different location, which correctly
4242
- // matches the behavior of the compiler, however, the build system
4243
- // currently always passes flags that makes all build artifacts output to
4244
- // the same local cache directory, and relies on them all being in the same
4245
- // directory.
4246
- //
4247
- // So, until the build system and protocol are changed to reflect this,
4248
- // this logic must ensure that emit_bin_path is emitted for at least one
4249
- // thing, if there are any artifacts.
4250
-
4251
- // std.debug.print("aaaaaaaaaaaaaaaaaa: {}\n", .{comp.cache_use});
4252
- // std.debug.print("aaaaaaaaaaaaaaaaaa comp.bin_file={s}\n", .{if (comp.bin_file) |bf| bf.emit.sub_path else "(null)"});
4253
- // std.debug.print("aaaaaaaaaaaaaaaaaa comp.emit_asm={s}\n", .{if (comp.emit_asm) |bf| bf.basename else "(null)"});
4254
-
4255
- // switch (comp.cache_use) {
4256
- // .incremental => if (comp.bin_file) |lf| {
4257
- // const full_path = try lf.emit.directory.join(gpa, &.{lf.emit.sub_path});
4258
- // std.debug.print("aaaaaaaaaaaaaaaaax: full_path={s}\n", .{full_path});
4259
- // defer gpa.free(full_path);
4260
- // try s.serveEmitBinPath(full_path, .{
4261
- // .flags = .{ .cache_hit = comp.last_update_was_cache_hit },
4262
- // });
4263
- // return;
4264
- // },
4265
- // .whole => |whole| if (whole.bin_sub_path) |sub_path| {
4266
- // const full_path = try comp.local_cache_directory.join(gpa, &.{sub_path});
4267
- // std.debug.print("aaaaaaaaaaaaaaaaay: full_path={s}\n", .{full_path});
4268
- // defer gpa.free(full_path);
4269
- // try s.serveEmitBinPath(full_path, .{
4270
- // .flags = .{ .cache_hit = comp.last_update_was_cache_hit },
4271
- // });
4272
- // return;
4273
- // } else {
4274
- // std.debug.print("aaaaaaaaaaaaaaaaaz: ue {*}\n", .{whole});
4275
- // },
4276
- // }
4277
-
4278
- // for ([_]?Compilation.Emit{
4279
- // comp.docs_emit,
4280
- // comp.implib_emit,
4281
- // }) |opt_emit| {
4282
- // const emit = opt_emit orelse continue;
4283
- // const full_path = try emit.directory.join(gpa, &.{emit.sub_path});
4284
- // std.debug.print("aaaaaaaaaaaaaaaaaz: full_path={s}\n", .{full_path});
4285
- // defer gpa.free(full_path);
4286
- // try s.serveEmitBinPath(full_path, .{
4287
- // .flags = .{ .cache_hit = comp.last_update_was_cache_hit },
4288
- // });
4289
- // return;
4290
- // }
4291
-
4292
- // for ([_]?Compilation.EmitLoc{
4293
- // comp.emit_asm,
4294
- // comp.emit_llvm_ir,
4295
- // comp.emit_llvm_bc,
4296
- // }) |opt_emit_loc| {
4297
- // std.debug.print("aaaaa\n", .{});
4298
- // const emit_loc = opt_emit_loc orelse continue;
4299
- // std.debug.print("aaaaa emit_loc={}\n", .{emit_loc});
4300
- // const directory = emit_loc.directory orelse continue;
4301
- // std.debug.print("aaaaa directory={s}\n", .{directory.path.?});
4302
- // const full_path = try directory.join(gpa, &.{emit_loc.basename});
4303
- // std.debug.print("aaaaaaaaaaaaaaaaaw: full_path={s}\n", .{full_path});
4304
- // defer gpa.free(full_path);
4305
- // try s.serveEmitBinPath(full_path, .{
4306
- // .flags = .{ .cache_hit = comp.last_update_was_cache_hit },
4307
- // });
4308
- // return;
4309
- // }
4310
-
4311
4237
// Serve empty error bundle to indicate the update is done.
4312
4238
try s .serveErrorBundle (std .zig .ErrorBundle .empty );
4313
4239
}
0 commit comments