diff options
author | 2023-08-24 19:05:40 -0700 | |
---|---|---|
committer | 2023-08-24 19:05:40 -0700 | |
commit | 097ae4e982a9cbcae6b4886c4efb82d452629b99 (patch) | |
tree | 6c274c82a951dc76a566f055985ea890cd92a3bd | |
parent | 213f5bef9d58ce90add3a83f5476f61f361ec3ef (diff) | |
download | bun-097ae4e982a9cbcae6b4886c4efb82d452629b99.tar.gz bun-097ae4e982a9cbcae6b4886c4efb82d452629b99.tar.zst bun-097ae4e982a9cbcae6b4886c4efb82d452629b99.zip |
fix build
-rw-r--r-- | .github/workflows/zig-fmt.yml | 2 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | docs/project/development.md | 2 | ||||
-rw-r--r-- | misctools/fetch.zig | 12 | ||||
-rw-r--r-- | src/bun.js/bindings/exports.zig | 3 | ||||
-rw-r--r-- | src/bun.js/node/types.zig | 2 | ||||
-rw-r--r-- | src/bun.js/test/jest.zig | 4 | ||||
-rw-r--r-- | src/bun.js/webcore/body.zig | 2 | ||||
-rw-r--r-- | src/bun.js/webcore/streams.zig | 14 | ||||
-rw-r--r-- | src/bundler/bundle_v2.zig | 2 | ||||
-rw-r--r-- | src/css_scanner.zig | 2 | ||||
-rw-r--r-- | src/install/install.zig | 6 | ||||
-rw-r--r-- | src/install/resolvers/folder_resolver.zig | 2 | ||||
-rw-r--r-- | src/js_ast.zig | 45 | ||||
-rw-r--r-- | src/options.zig | 8 | ||||
-rw-r--r-- | src/resolver/package_json.zig | 4 |
16 files changed, 59 insertions, 53 deletions
diff --git a/.github/workflows/zig-fmt.yml b/.github/workflows/zig-fmt.yml index d6f54cf40..04c4e1ec6 100644 --- a/.github/workflows/zig-fmt.yml +++ b/.github/workflows/zig-fmt.yml @@ -1,7 +1,7 @@ name: zig-fmt env: - ZIG_VERSION: 0.12.0-dev.161+6a5463951 + ZIG_VERSION: 0.12.0-dev.163+6780a6bbf on: pull_request: diff --git a/Dockerfile b/Dockerfile index e90225aad..b4206d691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ARG TRIPLET=${ARCH}-linux-gnu ARG BUILDARCH=amd64 ARG WEBKIT_TAG=2023-aug3-5 ARG ZIG_TAG=jul1 -ARG ZIG_VERSION="0.12.0-dev.161+6a5463951" +ARG ZIG_VERSION="0.12.0-dev.163+6780a6bbf" ARG WEBKIT_BASENAME="bun-webkit-linux-$BUILDARCH" ARG ZIG_FOLDERNAME=zig-linux-${BUILD_MACHINE_ARCH}-${ZIG_VERSION} diff --git a/docs/project/development.md b/docs/project/development.md index ad3f0df0c..b148d2b8e 100644 --- a/docs/project/development.md +++ b/docs/project/development.md @@ -112,7 +112,7 @@ Zig can be installed either with our npm package [`@oven/zig`](https://www.npmjs ```bash $ bun install -g @oven/zig -$ zigup 0.12.0-dev.161+6a5463951 +$ zigup 0.12.0-dev.163+6780a6bbf ``` {% callout %} diff --git a/misctools/fetch.zig b/misctools/fetch.zig index bb9e09a2a..347ce8cde 100644 --- a/misctools/fetch.zig +++ b/misctools/fetch.zig @@ -187,7 +187,17 @@ pub fn main() anyerror!void { var ctx = try default_allocator.create(HTTP.HTTPChannelContext); ctx.* = .{ .channel = channel, - .http = try HTTP.AsyncHTTP.init(default_allocator, args.method, args.url, args.headers, args.headers_buf, response_body_string, args.body, 0, HTTP.FetchRedirect.follow,), + .http = try HTTP.AsyncHTTP.init( + default_allocator, + args.method, + args.url, + args.headers, + args.headers_buf, + response_body_string, + args.body, + 0, + HTTP.FetchRedirect.follow, + ), }; ctx.http.callback = HTTP.HTTPChannelContext.callback; var batch = HTTPThread.Batch{}; diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig index ac19b4458..08d897590 100644 --- a/src/bun.js/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -1353,6 +1353,7 @@ pub const ZigConsoleClient = struct { Set: void, BigInt: void, Symbol: void, + CustomFormattedObject: CustomFormattedObject, GlobalObject: void, Private: void, Promise: void, @@ -1364,8 +1365,6 @@ pub const ZigConsoleClient = struct { Event: void, Getter: void, - CustomFormattedObject: CustomFormattedObject, - pub fn isPrimitive(this: @This()) bool { return @as(Tag, this).isPrimitive(); } diff --git a/src/bun.js/node/types.zig b/src/bun.js/node/types.zig index 6f5f412c3..79fdf9e6b 100644 --- a/src/bun.js/node/types.zig +++ b/src/bun.js/node/types.zig @@ -1044,8 +1044,8 @@ pub fn modeFromJS(ctx: JSC.C.JSContextRef, value: JSC.JSValue, exception: JSC.C. } pub const PathOrFileDescriptor = union(Tag) { - path: PathLike, fd: bun.FileDescriptor, + path: PathLike, pub const Tag = enum { fd, path }; diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig index 7e194f7c1..77cd79d21 100644 --- a/src/bun.js/test/jest.zig +++ b/src/bun.js/test/jest.zig @@ -1449,9 +1449,9 @@ pub const TestRunnerTask = struct { }; pub const Result = union(TestRunner.Test.Status) { - fail: u32, - pass: u32, // assertion count pending: void, + pass: u32, // assertion count + fail: u32, skip: void, todo: void, fail_because_todo_passed: u32, diff --git a/src/bun.js/webcore/body.zig b/src/bun.js/webcore/body.zig index 86462dd04..2cf4de874 100644 --- a/src/bun.js/webcore/body.zig +++ b/src/bun.js/webcore/body.zig @@ -450,8 +450,8 @@ pub const Body = struct { pub const Tag = enum { Blob, - InternalBlob, WTFStringImpl, + InternalBlob, // InlineBlob, Locked, Used, diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig index 1301a7280..b3415c4f7 100644 --- a/src/bun.js/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -518,17 +518,15 @@ pub const DrainResult = union(enum) { }; pub const StreamResult = union(Tag) { + pending: *Pending, + err: union(Err) { Error: Syscall.Error, JSValue: JSC.JSValue }, + done: void, owned: bun.ByteList, owned_and_done: bun.ByteList, temporary_and_done: bun.ByteList, temporary: bun.ByteList, into_array: IntoArray, into_array_and_done: IntoArray, - pending: *Pending, - - err: union(Err) { Error: Syscall.Error, JSValue: JSC.JSValue }, - - done: void, pub const Err = enum { Error, @@ -536,15 +534,15 @@ pub const StreamResult = union(Tag) { }; pub const Tag = enum { + pending, + err, + done, owned, owned_and_done, temporary_and_done, temporary, into_array, into_array_and_done, - pending, - err, - done, }; pub fn slice(this: *const StreamResult) []const u8 { diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig index 092c4d8e0..97118ac70 100644 --- a/src/bundler/bundle_v2.zig +++ b/src/bundler/bundle_v2.zig @@ -2327,8 +2327,8 @@ pub const ParseTask = struct { task: EventLoop.Task = undefined, value: union(Tag) { - err: Error, success: Success, + err: Error, empty: struct { source_index: Index, diff --git a/src/css_scanner.zig b/src/css_scanner.zig index db5e6ee0d..d8e827d03 100644 --- a/src/css_scanner.zig +++ b/src/css_scanner.zig @@ -29,8 +29,8 @@ pub const Chunk = struct { pub const Content = union(Tag) { t_url: TextContent, - t_import: Import, t_verbatim: Verbatim, + t_import: Import, }; pub fn raw(chunk: *const Chunk, source: *const logger.Source) string { diff --git a/src/install/install.zig b/src/install/install.zig index 06a171646..7635220a7 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -1015,9 +1015,7 @@ const PackageInstall = struct { } pub const Result = union(Tag) { - pending: void, success: void, - skip: void, fail: struct { err: anyerror, step: Step, @@ -1026,6 +1024,8 @@ const PackageInstall = struct { return this.err == error.FileNotFound and this.step == .opening_cache_dir; } }, + pending: void, + skip: void, pub const Tag = enum { success, @@ -1586,9 +1586,9 @@ const Progress = std.Progress; const TaggedPointer = @import("../tagged_pointer.zig"); const TaskCallbackContext = union(Tag) { dependency: DependencyID, + node_modules_folder: std.os.fd_t, root_dependency: DependencyID, root_request_id: PackageID, - node_modules_folder: std.os.fd_t, pub const Tag = enum { dependency, node_modules_folder, diff --git a/src/install/resolvers/folder_resolver.zig b/src/install/resolvers/folder_resolver.zig index e25d233dc..991a06b70 100644 --- a/src/install/resolvers/folder_resolver.zig +++ b/src/install/resolvers/folder_resolver.zig @@ -18,8 +18,8 @@ const bun = @import("root").bun; const Dependency = @import("../dependency.zig"); pub const FolderResolution = union(Tag) { package_id: PackageID, - new_package_id: PackageID, err: anyerror, + new_package_id: PackageID, pub const Tag = enum { package_id, err, new_package_id }; diff --git a/src/js_ast.zig b/src/js_ast.zig index 673b93bf3..3da189eda 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -2847,10 +2847,8 @@ pub const Stmt = struct { s_class, s_comment, s_continue, - s_debugger, s_directive, s_do_while, - s_empty, s_enum, s_export_clause, s_export_default, @@ -2858,23 +2856,25 @@ pub const Stmt = struct { s_export_from, s_export_star, s_expr, - s_for, s_for_in, s_for_of, + s_for, s_function, s_if, s_import, s_label, - s_lazy_export, s_local, s_namespace, s_return, s_switch, s_throw, s_try, - s_type_script, s_while, s_with, + s_type_script, + s_empty, + s_debugger, + s_lazy_export, pub fn jsonStringify(self: @This(), writer: anytype) !void { return try writer.write(@tagName(self)); @@ -4154,43 +4154,42 @@ pub const Expr = struct { e_array, e_unary, e_binary, - e_boolean, - e_super, - e_null, - e_undefined, + e_class, e_new, e_function, - e_new_target, - e_import_meta, e_call, e_dot, e_index, e_arrow, - e_identifier, - e_import_identifier, - e_private_identifier, e_jsx_element, - e_missing, - e_number, - e_big_int, e_object, e_spread, - e_string, e_template_part, e_template, e_reg_exp, e_await, e_yield, e_if, - e_require_resolve_string, e_import, - e_this, - e_class, + e_identifier, + e_import_identifier, + e_private_identifier, + e_commonjs_export_identifier, + e_boolean, + e_number, + e_big_int, + e_string, e_require_string, + e_require_resolve_string, e_require_call_target, e_require_resolve_call_target, - - e_commonjs_export_identifier, + e_missing, + e_this, + e_super, + e_null, + e_undefined, + e_new_target, + e_import_meta, // This should never make it to the printer inline_identifier, diff --git a/src/options.zig b/src/options.zig index fec09405c..8206be31e 100644 --- a/src/options.zig +++ b/src/options.zig @@ -1974,15 +1974,15 @@ pub const OutputFile = struct { }; pub const Value = union(Kind) { + move: FileOperation, + copy: FileOperation, + noop: u0, buffer: struct { allocator: std.mem.Allocator, bytes: []const u8, }, - saved: SavedFile, - move: FileOperation, - copy: FileOperation, - noop: u0, pending: resolver.Result, + saved: SavedFile, }; pub const SavedFile = struct { diff --git a/src/resolver/package_json.zig b/src/resolver/package_json.zig index 75e6a7c98..6022e5a6c 100644 --- a/src/resolver/package_json.zig +++ b/src/resolver/package_json.zig @@ -1194,12 +1194,12 @@ pub const ExportsMap = struct { map: Map, pub const Tag = enum { + invalid, null, - string, boolean, + string, array, map, - invalid, }; pub const Map = struct { |