diff options
author | 2023-06-21 23:38:18 -0700 | |
---|---|---|
committer | 2023-06-21 23:38:18 -0700 | |
commit | 5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f (patch) | |
tree | 97f669a178e60772038751d690c3e298a63557b2 /src/cli/build_command.zig | |
parent | bfb322d618a3f0e9618d311ae69016fe7a08e771 (diff) | |
download | bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.gz bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.zst bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.zip |
upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)
* progress
* finish `@memset/@memcpy` update
* Update build.zig
* change `@enumToInt` to `@intFromEnum` and friends
* update zig versions
* it was 1
* add link to issue
* add `compileError` reminder
* fix merge
* format
* upgrade to llvm 16
* Revert "upgrade to llvm 16"
This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8.
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/cli/build_command.zig')
-rw-r--r-- | src/cli/build_command.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig index 14414c7de..44e512996 100644 --- a/src/cli/build_command.zig +++ b/src/cli/build_command.zig @@ -320,8 +320,8 @@ pub const BuildCommand = struct { var from_path = resolve_path.longestCommonPath(all_paths); for (output_files) |f| { - max_path_len = std.math.max( - std.math.max(from_path.len, f.dest_path.len) + 2 - from_path.len, + max_path_len = @max( + @max(from_path.len, f.dest_path.len) + 2 - from_path.len, max_path_len, ); } @@ -356,7 +356,7 @@ pub const BuildCommand = struct { Output.pretty("{s}", .{padding_buf[0..@intCast(usize, compiled_elapsed_digit_count)]}); - Output.printElapsedStdoutTrim(@intToFloat(f64, compiled_elapsed)); + Output.printElapsedStdoutTrim(@floatFromInt(f64, compiled_elapsed)); Output.prettyln(" <green>compile<r> <b><blue>{s}<r>", .{ outfile, @@ -446,11 +446,11 @@ pub const BuildCommand = struct { // Print summary _ = try writer.write("\n"); - const padding_count = 2 + (std.math.max(rel_path.len, max_path_len) - rel_path.len); + const padding_count = 2 + (@max(rel_path.len, max_path_len) - rel_path.len); try writer.writeByteNTimes(' ', 2); try writer.writeAll(rel_path); try writer.writeByteNTimes(' ', padding_count); - const size = @intToFloat(f64, f.size) / 1000.0; + const size = @floatFromInt(f64, f.size) / 1000.0; try std.fmt.formatFloatDecimal(size, .{ .precision = 2 }, writer); try writer.writeAll(" KB\n"); } @@ -460,7 +460,7 @@ pub const BuildCommand = struct { if (write_summary and log.errors == 0) { Output.prettyln("\n", .{}); Output.printElapsedStdoutTrim( - @intToFloat(f64, (@divTrunc(@truncate(i64, std.time.nanoTimestamp() - bun.CLI.start_time), @as(i64, std.time.ns_per_ms)))), + @floatFromInt(f64, (@divTrunc(@truncate(i64, std.time.nanoTimestamp() - bun.CLI.start_time), @as(i64, std.time.ns_per_ms)))), ); if (this_bundler.options.transform_only) { Output.prettyln(" <green>transpile<r>", .{}); @@ -505,7 +505,7 @@ fn printSummary(bundled_end: i128, minify_duration: u64, minified: bool, input_c }; if (minified) { Output.pretty("{s}", .{padding_buf[0..@intCast(usize, minified_digit_count)]}); - Output.printElapsedStdoutTrim(@intToFloat(f64, minify_duration)); + Output.printElapsedStdoutTrim(@floatFromInt(f64, minify_duration)); const output_size = brk: { var total_size: u64 = 0; for (output_files) |f| { @@ -547,7 +547,7 @@ fn printSummary(bundled_end: i128, minify_duration: u64, minified: bool, input_c }; Output.pretty("{s}", .{padding_buf[0..@intCast(usize, bundle_elapsed_digit_count)]}); - Output.printElapsedStdoutTrim(@intToFloat(f64, bundle_elapsed)); + Output.printElapsedStdoutTrim(@floatFromInt(f64, bundle_elapsed)); Output.prettyln( " <green>bundle<r> {d} modules", .{ |