diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-11-12 22:53:24 +0000 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-11-12 21:55:46 -0800 |
| commit | 9ebce51e164c6d35e4f412eb747fa8d3c6ea84b3 (patch) | |
| tree | d96d93a907d3d1c92ca56a6ca28493ce65ea801d /src/main.zig | |
| parent | 9996f8b9b17f7e04be64ac220c9bad743b45a2b7 (diff) | |
| download | zig-9ebce51e164c6d35e4f412eb747fa8d3c6ea84b3.tar.gz zig-9ebce51e164c6d35e4f412eb747fa8d3c6ea84b3.zip | |
compiler: un-jit `zig fmt`
This command being JITed leads to a substantially worse first-time user
experience, since you have to wait for upwards of 20 seconds for
`fmt.zig` to build. This is especially bad when your editor is
configured to run `zig fmt` on save and does so in a blocking manner. As
such, it makes sense from a usability perspective to not JIT this
particular command.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig index e77effd443..9b245b3eda 100644 --- a/src/main.zig +++ b/src/main.zig @@ -309,10 +309,7 @@ fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { .server = use_server, }); } else if (mem.eql(u8, cmd, "fmt")) { - return jitCmd(gpa, arena, cmd_args, .{ - .cmd_name = "fmt", - .root_src_path = "fmt.zig", - }); + return @import("fmt.zig").run(gpa, arena, cmd_args); } else if (mem.eql(u8, cmd, "objcopy")) { return jitCmd(gpa, arena, cmd_args, .{ .cmd_name = "objcopy", |
