aboutsummaryrefslogtreecommitdiff
path: root/src/install
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-04-22 19:44:23 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-22 19:44:23 -0700
commit4b24bb464c5a54c728bee8c9b4aa30a60c3fb7d4 (patch)
tree7983dd2d5ba18f9a6111be2e7e6d17f69d170bba /src/install
parent7d6b5f5358617f92ace6f3103dd835ddff73f92a (diff)
downloadbun-4b24bb464c5a54c728bee8c9b4aa30a60c3fb7d4.tar.gz
bun-4b24bb464c5a54c728bee8c9b4aa30a60c3fb7d4.tar.zst
bun-4b24bb464c5a54c728bee8c9b4aa30a60c3fb7d4.zip
Make `Bun.build` more reliable (#2718)
* One possible implementation to make `Bun.build` work better * Pass allocator in * Make our temporary buffers a little safer * rename * Fix memory corruption in symbol table * Add support for deferred idle events in ThreadPool * Free more memory * Use a global allocator FS cache * more `inline` * Make duping keys optional in StringMap * Close file handles more often * Update router.zig * wip possibly delete this commit * Fix memory issues and reduce memory usage * > 0.8 * Switch to AsyncIO.Waker and fix memory leak in JSBundleCompletionTask * We don't need to clone this actually * Fix error * Format * Fixup * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r--src/install/install.zig8
-rw-r--r--src/install/lockfile.zig4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/install/install.zig b/src/install/install.zig
index d6ecd2f46..ddad15dd9 100644
--- a/src/install/install.zig
+++ b/src/install/install.zig
@@ -4976,7 +4976,7 @@ pub const PackageManager = struct {
try global_dir.dir.setAsCwd();
}
- var fs = try Fs.FileSystem.init1(ctx.allocator, null);
+ var fs = try Fs.FileSystem.init(null);
var original_cwd = std.mem.trimRight(u8, fs.top_level_dir, "/");
bun.copy(u8, &cwd_buf, original_cwd);
@@ -5041,7 +5041,7 @@ pub const PackageManager = struct {
};
env.loadProcess();
- try env.load(&fs.fs, &entries_option.entries, false);
+ try env.load(&fs.fs, entries_option.entries, false);
if (env.map.get("BUN_INSTALL_VERBOSE") != null) {
PackageManager.verbose_install = true;
@@ -5068,7 +5068,7 @@ pub const PackageManager = struct {
.network_task_fifo = NetworkQueue.init(),
.allocator = ctx.allocator,
.log = ctx.log,
- .root_dir = &entries_option.entries,
+ .root_dir = entries_option.entries,
.env = env,
.cpu_count = cpu_count,
.thread_pool = ThreadPool.init(.{
@@ -5143,7 +5143,7 @@ pub const PackageManager = struct {
.network_task_fifo = NetworkQueue.init(),
.allocator = allocator,
.log = log,
- .root_dir = &root_dir.entries,
+ .root_dir = root_dir.entries,
.env = env,
.cpu_count = cpu_count,
.thread_pool = ThreadPool.init(.{
diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig
index 86ad1ac54..ea1c4fcf8 100644
--- a/src/install/lockfile.zig
+++ b/src/install/lockfile.zig
@@ -854,7 +854,7 @@ pub const Printer = struct {
if (lockfile_path.len > 0 and lockfile_path[0] == std.fs.path.sep)
std.os.chdir(std.fs.path.dirname(lockfile_path) orelse "/") catch {};
- _ = try FileSystem.init1(allocator, null);
+ _ = try FileSystem.init(null);
var lockfile = try allocator.create(Lockfile);
@@ -918,7 +918,7 @@ pub const Printer = struct {
};
env_loader.loadProcess();
- try env_loader.load(&fs.fs, &entries_option.entries, false);
+ try env_loader.load(&fs.fs, entries_option.entries, false);
var log = logger.Log.init(allocator);
try options.load(
allocator,