-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zig 0.10.0 #1491
Zig 0.10.0 #1491
Conversation
Thank you for this Probably most tedious will be the openDirIterable changes |
The other thing we will need to do is update to llvm 15 everywhere. For that, we mostly use llvm's download script so it will be automatic for Docker We will also need to rebuild WebKit with LLVM 15. I can do that part |
sorry for the conflicts |
Got
|
This flag means ENABLE(WEBGL) is being set when it shouldn't be Is your cmakeconfig.h the one from bun or is it from an official build of webkit? It needs to be Bun's JSCOnly port |
I think all the usages of {any} are incorrect {any] prints the raw bytes as integers We want strings To fix:
we need to wrap in which is annoying |
Yep its caused a few other issues too. It was the only global find+replace I did. Need to double check each usage individually. |
Sema passes but the stage1 build segfaults https://github.com/oven-sh/bun/commit/934360646fd063a84c6527eea059dc40ae0050bb.patch |
Once I fix my build on Ventura I can finish it off. |
I think the best approach would be to use stage2. They're about to delete stage1. But, they haven't implemented async/await support yet. There are about 15 usages of suspend / resume in Bun. I don't think it would be too difficult to replace them with function calls. Some kind of Promise-like abstraction. The only tricky one to replace will be the For that, I think we will need to use long jump in C. Which is fine. But it means we have to have a "suspend" and "resume" specifically for those to ensure that things like |
Is this because you think that the segfault from the stage1 build will be to hard to track down? I'd say its probably better to get stage1 working if we can, and then upgrade stage2 separately... |
NOTE:
https://discord.com/channels/876711213126520882/888839314056839309/1046978389350817812 |
See: #1610 |
See: #1490
I'm trying to compile a list of things that need changing based on errors I see.
Build command
Fixes
error: invalid builtin function: '@minimum'
Fix: Rename
@maximum and @minimum
to@max and @min
@maximum
and@minimum
to@max
and@min
ziglang/zig#12994error: no field named 'iterate' in struct 'fs.Dir.OpenDirOptions'
http://ratfactor.com/zig/stdlib-browseable/fs.zig.html
Dir
intoIterableDir
ziglang/zig#12060OpenDirOptions.iterate = true
on Linux (Ubuntu), works fine on MacOS ziglang/zig#12007error: empty test name must be omitted
test ""
->test
error: expected 1 argument, found 2 - @popCount
error: number '0000010' has leading zero
capture shadows declaration of 'str'
pointless discard of function parameter
@ctz - expected 1 argument, found 2
Following ziglang's approach from here:
https://github.com/ziglang/zig/blob/df7223c7f2504b8f98526a86630bd6a7c07720a9/lib/std/Thread/Mutex.zig#L142-L145
HELP WANTED:
error: declaration 'Type' shadows function parameter from outer scope
I used
MyType
to avoid shadowing...maybe you want something different.error: pointless discard of function parameter
There are a bunch of these...
Not sure why they exist in the first place...maybe unreachable?
See: ziglang/zig#12803
There is a proposal to add
unused = foo
: ziglang/zig#10245function type cannot have a name
pub const TypeInfo = @compileError("deprecated; use Type");
fmt -
{s}
->{any}
enum 'src.tagged_pointer.enum:67:37' has no field named 'Microtask'
...and
FileBlobLoader
, etc.Related:
error: unable to evaluate constant expression
This is caused by using
{}
or{any}
withcomptimePrint
. It tries to dereference a point which is not valid during comptime.This was probably caused by me changing all
{}
to{any}
.sys/cdefs.h' file not found
Zig using x86 build instead of arm64. Make sure the run
eval opt/homebew....
command.return val posix_spawnattr_destroy
ziglang/zig#12964
@alignCast
...