4
92
Fork
You've already forked zg
23

Updates for 0.16.0 #97

Closed
opened 2026年02月13日 16:11:50 +01:00 by loftafi · 5 comments

There is codeine code that builds under 0.15.2, but not under 0.16.0. I believe 0.16.0 will arrive soon, so I am getting a head start looking into what needs to happen. i.e.

zig-pkg/zg-0.15.1-oGqU3J1DtAJhPKw_pU5s8kHGVYDk1leZm4TtO1cvMihq/codegen/ccc.zig:33:25: error: root source file struct 'std' has no member named 'io'
 var cc_reader = std.io.Reader.fixed(@embedFile("DerivedCombiningClass.txt"));
codegen/upper.zig:12:36: error: root source file struct 'process' has no member named 'argsWithAllocator'
var args_iter = try std.process.argsWithAllocator(allocator);
 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
codegen/fold.zig:17:29: error: root source file struct 'mem' has no member named 'trimRight'
 const line = std.mem.trimRight(u8, took, "\n");

I just wanted to get the ball rolling on this. I am not overly familiar with the 0.16 changes yet. I wonder if it is possible to change the code in a way that it would be backwards compatible. aka work with both 0.15.2 and 0.16.0.

--

  • In codegen it is possible to change std.io.Reader.fixed(...) to std.Io.Reader.fixed(...) and it builds with both versions.
  • std.mem.trimRight can become std.mem.trimEnd and works in both versions.
There is codeine code that builds under 0.15.2, but not under 0.16.0. I believe 0.16.0 will arrive soon, so I am getting a head start looking into what needs to happen. i.e. ``` zig-pkg/zg-0.15.1-oGqU3J1DtAJhPKw_pU5s8kHGVYDk1leZm4TtO1cvMihq/codegen/ccc.zig:33:25: error: root source file struct 'std' has no member named 'io' var cc_reader = std.io.Reader.fixed(@embedFile("DerivedCombiningClass.txt")); ``` ``` codegen/upper.zig:12:36: error: root source file struct 'process' has no member named 'argsWithAllocator' var args_iter = try std.process.argsWithAllocator(allocator); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ``` ``` codegen/fold.zig:17:29: error: root source file struct 'mem' has no member named 'trimRight' const line = std.mem.trimRight(u8, took, "\n"); ``` I just wanted to get the ball rolling on this. I am not overly familiar with the 0.16 changes yet. I wonder if it is possible to change the code in a way that it would be backwards compatible. aka work with both 0.15.2 and 0.16.0. -- - In `codegen` it is possible to change `std.io.Reader.fixed(...)` to `std.Io.Reader.fixed(...)` and it builds with both versions. - `std.mem.trimRight` can become `std.mem.trimEnd` and works in both versions.
Author
Copy link

Pull request #98 fixes these first two problems with 0.16.0 while remaining compatible with 0.15.2

There is one more 0.16.0 build issue. std.process.argsWithAllocator was not deprecated, but fully deleted. Im looking to see if there is a way to change this for 0.16.0 without breaking for 0.15.2

Pull request https://codeberg.org/atman/zg/pulls/98 fixes these first two problems with 0.16.0 while remaining compatible with 0.15.2 There is one more 0.16.0 build issue. `std.process.argsWithAllocator` was not deprecated, but fully deleted. Im looking to see if there is a way to change this for 0.16.0 without breaking for 0.15.2
Author
Copy link

Commit f2243a83dc in pull request #98 passes the tests under zig 0.16-dev/master branch. Use this commit if you are upgrading to the latest master of zig.

Commit f2243a83dc in pull request #98 passes the `test`s under zig 0.16-dev/master branch. Use this commit if you are upgrading to the latest master of zig.
Owner
Copy link

zg will be updated to 0.16 after it's released, rather than before.

I just published a preview release of the next point release, which runs under (Zig) 0.15.2, not master branch. There are fairly major, pervasive changes, most of which consists of merging Jacob's work on removing allocation.

The target branch is called no-allocation, if you want to redo all this so that it's useful when the time comes.

`zg` will be updated to `0.16` after it's released, rather than before. I just published a [preview release](https://codeberg.org/atman/zg/releases/tag/v0.16.0-rc1) of the next point release, which runs under (Zig) `0.15.2`, not master branch. There are fairly major, pervasive changes, most of which consists of merging Jacob's work on removing allocation. The target branch is called `no-allocation`, if you want to redo all this so that it's useful when the time comes.
Author
Copy link

Thanks. Yea, I just needed to get something up and running so zg is not blocking my overall 0.16 upgrade. If this fork helps someone in the mean time, great. :)

(I still have many thousands of other 0.16 updates on my main project before I can look at much else)

Thanks. Yea, I just needed to get something up and running so `zg` is not blocking my overall 0.16 upgrade. If this fork helps someone in the mean time, great. :) (I still have many thousands of other 0.16 updates on my main project before I can look at much else)
Owner
Copy link

Closed with v0.16.0.

Closed with [v0.16.0](https://codeberg.org/atman/zg/releases/tag/v0.16.0).
Sign in to join this conversation.
No Branch/Tag specified
master
no-allocation
v0.16.2
v0.16.1
v0.16.0
v0.16.0-rc2
v0.16.0-rc1
v0.15.4
v0.15.3
v0.15.2
v0.14.1
v0.14
v0.14.0-rc3
v0.14.0-rc2
v0.14.0-rc1
v0.13.5
v0.13.4
v0.13.2
v0.13.1
v0.13.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
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
atman/zg#97
Reference in a new issue
atman/zg
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?