mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
chore: remove some trivial usage of usingnamespace (#17268)
This commit is contained in:
21
build.zig
21
build.zig
@@ -429,7 +429,7 @@ pub fn addBunObject(b: *Build, opts: *BunBuildOptions) *Compile {
|
||||
.name = if (opts.optimize == .Debug) "bun-debug" else "bun",
|
||||
.root_source_file = switch (opts.os) {
|
||||
.wasm => b.path("root_wasm.zig"),
|
||||
else => b.path("root.zig"),
|
||||
else => b.path("src/main.zig"),
|
||||
// else => b.path("root_css.zig"),
|
||||
},
|
||||
.target = opts.target,
|
||||
@@ -519,16 +519,6 @@ fn exists(path: []const u8) bool {
|
||||
fn addInternalPackages(b: *Build, obj: *Compile, opts: *BunBuildOptions) void {
|
||||
const os = opts.os;
|
||||
|
||||
const io_path = switch (os) {
|
||||
.mac => "src/io/io_darwin.zig",
|
||||
.linux => "src/io/io_linux.zig",
|
||||
.windows => "src/io/io_windows.zig",
|
||||
else => "src/io/io_stub.zig",
|
||||
};
|
||||
obj.root_module.addAnonymousImport("async_io", .{
|
||||
.root_source_file = b.path(io_path),
|
||||
});
|
||||
|
||||
const zlib_internal_path = switch (os) {
|
||||
.windows => "src/deps/zlib.win32.zig",
|
||||
.linux, .mac => "src/deps/zlib.posix.zig",
|
||||
@@ -598,6 +588,15 @@ fn addInternalPackages(b: *Build, obj: *Compile, opts: *BunBuildOptions) void {
|
||||
});
|
||||
}
|
||||
}
|
||||
inline for (.{
|
||||
.{ .import = "completions-bash", .file = b.path("completions/bun.bash") },
|
||||
.{ .import = "completions-zsh", .file = b.path("completions/bun.zsh") },
|
||||
.{ .import = "completions-fish", .file = b.path("completions/bun.fish") },
|
||||
}) |entry| {
|
||||
obj.root_module.addAnonymousImport(entry.import, .{
|
||||
.root_source_file = entry.file,
|
||||
});
|
||||
}
|
||||
|
||||
if (os == .windows) {
|
||||
obj.root_module.addAnonymousImport("bun_shim_impl.exe", .{
|
||||
|
||||
Reference in New Issue
Block a user