2
3
Fork
You've already forked ncsu
0

Compilation error on Zig master after a0a2ce9 #205

Closed
opened 2022年06月26日 11:05:06 +02:00 by NyanCatTW1 · 6 comments
NyanCatTW1 commented 2022年06月26日 11:05:06 +02:00 (Migrated from code.blicky.net)
Copy link

When I tried to build the latest ncdu version (058b26bf9a), the following error occured:

./src/main.zig:345:38: error: expected error union type, found 'std.child_process.ChildProcess'
 var child = std.ChildProcess.init(&.{shell}, allocator) catch unreachable;

It's due to commit a0a2ce9, which quote "std: Do not allocate the result for ChildProcess.init"
A patch is provided that will hopefully still work by the time of the Zig 0.10 release.

When I tried to build the latest ncdu version (058b26bf9a), the following error occured: ``` ./src/main.zig:345:38: error: expected error union type, found 'std.child_process.ChildProcess' var child = std.ChildProcess.init(&.{shell}, allocator) catch unreachable; ``` It's due to commit a0a2ce9, which quote "std: Do not allocate the result for ChildProcess.init" A patch is provided that will hopefully still work by the time of the Zig 0.10 release.
yorhel commented 2022年06月26日 11:07:45 +02:00 (Migrated from code.blicky.net)
Copy link

No need, I'll upgrade to latest Zig when 0.10 comes out. Keeping up with changes on master before that is usually not worth the effort.

No need, I'll upgrade to latest Zig when 0.10 comes out. Keeping up with changes on master before that is usually not worth the effort.
NyanCatTW1 commented 2022年06月26日 11:09:40 +02:00 (Migrated from code.blicky.net)
Copy link

Thanks for the fast reply! Guess it's still worth it to figure out the fix early though? Or is zig fmt capable of patching it automatically by the time of release?

Thanks for the fast reply! Guess it's still worth it to figure out the fix early though? Or is `zig fmt` capable of patching it automatically by the time of release?
yorhel commented 2022年06月26日 11:18:34 +02:00 (Migrated from code.blicky.net)
Copy link

It's a manual process, but the reason I don't fix these early on is because the fixes will often break compatibility with stable Zig. If course, if there's an easy fix that works across both stable and master Zig I'll be happy to apply it anyway, but in general I don't put much effort in supporting master, given how unstable it is.

It's a manual process, but the reason I don't fix these early on is because the fixes will often break compatibility with stable Zig. If course, if there's an easy fix that works across both stable and master Zig I'll be happy to apply it anyway, but in general I don't put much effort in supporting master, given how unstable it is.
NyanCatTW1 commented 2022年06月26日 11:20:07 +02:00 (Migrated from code.blicky.net)
Copy link

My current plan is just to figure out the patch, so that by the time the update comes out, it will be as simple as applying the patch.
That is, if the std library doesn't change again in a breaking way before that...

My current plan is just to figure out the patch, so that by the time the update comes out, it will be as simple as applying the patch. That is, if the std library doesn't change again in a breaking way before that...
NyanCatTW1 commented 2022年06月26日 11:33:52 +02:00 (Migrated from code.blicky.net)
Copy link

Got it! Unfortunately it will break compatibility with stable Zig. I'll just put the patch here and wait for it to hopefully become useful once the 0.10 release comes out.

Got it! Unfortunately it will break compatibility with stable Zig. I'll just put the patch here and wait for it to hopefully become useful once the 0.10 release comes out.
yorhel commented 2022年11月01日 08:49:22 +01:00 (Migrated from code.blicky.net)
Copy link

0.10.0 is out, I'll post status and updates in #213

0.10.0 is out, I'll post status and updates in #213
Sign in to join this conversation.
No Branch/Tag specified
zig
zig0.16
master
zig-threaded
openat
chdir
clear
compll
v2.9.3
v2.9.2
v2.9.1
v2.9
v2.8.2
v2.8.1
v2.8
v1.22
v1.21
v2.7
v2.6
v2.5
v1.20
v2.4
v1.19
v2.3
v1.18.1
v2.2.2
v1.18
v2.2.1
v2.2
v1.17
v2.1.2
v2.1.1
v2.1
v2.0.1
v2.0
v2.0-beta3
v2.0-beta2
v2.0-beta1
v1.16
v1.15.1
v1.15
v1.14.2
v1.14.1
v1.14
v1.13
v1.12
v1.11
v1.10
v1.9
v1.8
v1.7
v1.6
v1.5
v1.4
v1.3
v1.2
v1.1
No labels
1.x
2.x
bug
feature
imported
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
selfisekai/ncsu#205
Reference in a new issue
selfisekai/ncsu
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?