From 805e87eeb6a2c77a35c779f6d50cdbf49291f988 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Fri, 27 Jan 2023 03:29:36 -0800 Subject: Add a comment --- src/bun.js/javascript.zig | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/bun.js/javascript.zig') diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 1a0b7783f..7ff935f0b 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -2776,18 +2776,8 @@ pub const HotReloader = struct { if (this.verbose) Output.prettyErrorln("File changed: {s}", .{fs.relativeTo(file_path)}); - if (comptime Environment.isMac) { - // kqueue will report one of these if you rename, delete, or write to a file descriptor - // since it's a file descriptor and not a file path, the - // file descriptor will need to be closed for some - // changes to be reflected - if (event.op.write or event.op.delete or event.op.rename) { - current_task.append(id); - } - } else { - if (event.op.write) { - current_task.append(id); - } + if (event.op.write or event.op.delete or event.op.rename) { + current_task.append(id); } }, .directory => { @@ -2888,19 +2878,13 @@ pub const HotReloader = struct { last_file_hash = file_hash; if (this.verbose) - Output.prettyErrorln(" File change: {s}", .{fs.relativeTo(abs_path)}); + Output.prettyErrorln(" File change: {s}", .{fs.relativeTo(abs_path)}); } } } if (this.verbose) { - // if (event.op.delete or event.op.rename) - // ctx.watcher.removeAtIndex(event.index, hashes[event.index], parent_hashes, .directory); - if (comptime false) { - Output.prettyErrorln("📁 Dir change: {s}", .{fs.relativeTo(file_path)}); - } else { - Output.prettyErrorln(" Dir change: {s}", .{fs.relativeTo(file_path)}); - } + Output.prettyErrorln(" Dir change: {s}", .{fs.relativeTo(file_path)}); } }, } -- cgit v1.2.3