mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
chore: upgrade zig to 0.13.0 (#9965)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Grigory <grigory.orlov.set@gmail.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Co-authored-by: Meghan Denny <hello@nektro.net> Co-authored-by: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com> Co-authored-by: John-David Dalton <john.david.dalton@gmail.com> Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com> Co-authored-by: paperdave <paperdave@users.noreply.github.com> Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
This commit is contained in:
@@ -523,7 +523,7 @@ pub const ExitHandler = struct {
|
||||
|
||||
pub fn dispatchOnExit(this: *ExitHandler) void {
|
||||
JSC.markBinding(@src());
|
||||
var vm = @fieldParentPtr(VirtualMachine, "exit_handler", this);
|
||||
const vm: *VirtualMachine = @alignCast(@fieldParentPtr("exit_handler", this));
|
||||
Process__dispatchOnExit(vm.global, this.exit_code);
|
||||
if (vm.isMainThread()) {
|
||||
Bun__closeAllSQLiteDatabasesForTermination();
|
||||
@@ -532,7 +532,7 @@ pub const ExitHandler = struct {
|
||||
|
||||
pub fn dispatchOnBeforeExit(this: *ExitHandler) void {
|
||||
JSC.markBinding(@src());
|
||||
const vm = @fieldParentPtr(VirtualMachine, "exit_handler", this);
|
||||
const vm: *VirtualMachine = @alignCast(@fieldParentPtr("exit_handler", this));
|
||||
Process__dispatchOnBeforeExit(vm.global, this.exit_code);
|
||||
}
|
||||
};
|
||||
@@ -1230,7 +1230,9 @@ pub const VirtualMachine = struct {
|
||||
}
|
||||
|
||||
debug("spin", .{});
|
||||
while (futex_atomic.load(.Monotonic) > 0) std.Thread.Futex.wait(&futex_atomic, 1);
|
||||
while (futex_atomic.load(.monotonic) > 0) {
|
||||
std.Thread.Futex.wait(&futex_atomic, 1);
|
||||
}
|
||||
if (comptime Environment.allow_assert)
|
||||
debug("waitForDebugger: {}", .{Output.ElapsedFormatter{
|
||||
.colors = Output.enable_ansi_colors_stderr,
|
||||
@@ -1302,7 +1304,7 @@ pub const VirtualMachine = struct {
|
||||
}
|
||||
|
||||
debug("wake", .{});
|
||||
futex_atomic.store(0, .Monotonic);
|
||||
futex_atomic.store(0, .monotonic);
|
||||
std.Thread.Futex.wake(&futex_atomic, 1);
|
||||
|
||||
this.eventLoop().tick();
|
||||
@@ -3891,6 +3893,9 @@ pub fn NewHotReloader(comptime Ctx: type, comptime EventLoopType: type, comptime
|
||||
err: bun.sys.Error,
|
||||
) void {
|
||||
Output.err(@as(bun.C.E, @enumFromInt(err.errno)), "Watcher crashed", .{});
|
||||
if (bun.Environment.isDebug) {
|
||||
@panic("Watcher crash");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn getContext(this: *@This()) *@This().Watcher {
|
||||
@@ -3998,7 +4003,7 @@ pub fn NewHotReloader(comptime Ctx: type, comptime EventLoopType: type, comptime
|
||||
if (parent_hash == id) {
|
||||
const affected_path = file_paths[entry_id];
|
||||
const was_deleted = check: {
|
||||
std.os.access(affected_path, std.os.F_OK) catch break :check true;
|
||||
std.posix.access(affected_path, std.posix.F_OK) catch break :check true;
|
||||
break :check false;
|
||||
};
|
||||
if (!was_deleted) continue;
|
||||
|
||||
Reference in New Issue
Block a user