Compare commits

...

8 Commits

Author SHA1 Message Date
Jarred Sumner
e4da99d447 b 2025-06-08 00:25:31 -07:00
Jarred Sumner
645805343f a 2025-06-08 00:25:24 -07:00
Jarred-Sumner
6c4f39d98b bun run zig-format 2025-06-08 06:14:08 +00:00
Jarred Sumner
89569b0c27 Attempt to fix out of bounds access in onFileDeleted 2025-06-07 23:12:06 -07:00
Jarred Sumner
857ba44c25 Update DevServer.zig 2025-06-07 22:43:31 -07:00
Jarred-Sumner
199b02ed9f bun run prettier 2025-06-08 05:25:45 +00:00
Jarred-Sumner
88fb257016 bun run zig-format 2025-06-08 05:24:29 +00:00
Jarred Sumner
b8d98d64ef Attempt to fix out of bounds access in onFileDeleted 2025-06-07 22:22:09 -07:00
2 changed files with 16 additions and 12 deletions

View File

@@ -4133,7 +4133,7 @@ pub fn IncrementalGraph(side: bake.Side) type {
prev_dependency.next_dependency = edge.next_dependency;
} else {
assert_eql(g.first_dep.items[edge.imported.get()].unwrap(), edge_index);
g.first_dep.items[edge.imported.get()] = .none;
g.first_dep.items[edge.imported.get()] = edge.next_dependency;
}
if (edge.next_dependency.unwrap()) |next| {
const next_dependency = &g.edges.items[next.get()];
@@ -4823,7 +4823,15 @@ pub fn IncrementalGraph(side: bake.Side) type {
const keys = g.bundled_files.keys();
// Disconnect all imports
// Clean up the tailwind hack map if this file is tracked there
const dev = g.owner();
if (dev.has_tailwind_plugin_hack) |*map| {
if (map.fetchSwapRemove(abs_path)) |entry| {
dev.allocator.free(entry.key);
}
}
// Disconnect all imports (edges where this file imports others)
var it: ?EdgeIndex = g.first_import.items[index.get()].unwrap();
while (it) |edge_index| {
const dep = g.edges.items[edge_index.get()];
@@ -5215,14 +5223,10 @@ pub fn IncrementalGraph(side: bake.Side) type {
g.edges.items[edge_index.get()] = undefined;
}
if (edge_index.get() == (g.edges.items.len - 1)) {
g.edges.items.len -= 1;
} else {
g.edges_free_list.append(g.owner().allocator, edge_index) catch {
// Leak an edge object; Ok since it may get cleaned up by
// the next incremental graph garbage-collection cycle.
};
}
g.edges_free_list.append(g.owner().allocator, edge_index) catch {
// Leak an edge object; Ok since it may get cleaned up by
// the next incremental graph garbage-collection cycle.
};
}
pub fn owner(g: *@This()) *DevServer {

View File

@@ -1708,12 +1708,12 @@ function internalConnect(self, options, address, port, addressType, localAddress
if (localAddress || localPort) {
if (addressType === 4) {
localAddress ||= '0.0.0.0';
localAddress ||= "0.0.0.0";
// TODO:
// err = self._handle.bind(localAddress, localPort);
} else {
// addressType === 6
localAddress ||= '::';
localAddress ||= "::";
// TODO:
// err = self._handle.bind6(localAddress, localPort, flags);
}