Skip to content

Migrate to zig 0.16#5

Draft
illya-laifu wants to merge 11 commits intozig-utils:mainfrom
illya-laifu:zig-0.16-migrations
Draft

Migrate to zig 0.16#5
illya-laifu wants to merge 11 commits intozig-utils:mainfrom
illya-laifu:zig-0.16-migrations

Conversation

@illya-laifu
Copy link
Copy Markdown

Creating this PR as a draft, because this is quite the chore and I want to be able to track the process and not just dump a huge blob of changes.

HOWEVER I have no idea how I am going to achieve that, since changes to the examples and benches depend on the changes to the lib. And way too many examples, lib code and tests currently refuse to compile, and fixing compilation errors is all-or-none kind of game.

I'll do my best, but any tips are welcome.

@illya-laifu
Copy link
Copy Markdown
Author

The 7e53962 compiles, but fails with RegexError.InvalidCharacterClass on the phone regex at examples/advanced_features.zig:77

It passes the smell test though, so I will look at it later.

@illya-laifu
Copy link
Copy Markdown
Author

Alright, this is all that is necessary for zig build to not explode and build everything.

Now, onto the tests.


I've left a few todos in there, as I have no immediate idea on how to correctly handle some of the situations, so I just did the bare minimum that I could think of (eg, using real clock for timing).

@illya-laifu
Copy link
Copy Markdown
Author

All the tests are green.

There is only one thing that is bothering me - while running tests via zig build test, I encountered an error that I had to explicitly link against libc (due to FFI) - that's why I had to add that to the build.zig


Follow-up question - is there a reason why optimize is not used in the executable?

@illya-laifu
Copy link
Copy Markdown
Author

Another thing I've noticed - but it seems like the fingerprint of the build.zig.zon is off - I had to overwrite it while working on my branch. I verified it with the brand new repo and zig fetch <release url> and the issue persists there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant