Skip to content

Conversation

@FalsePattern
Copy link
Contributor

@FalsePattern FalsePattern commented Jun 17, 2023

Problem

std.math.min and std.math.max were deprecated with @compileError in ziglang/zig#16025 (build number 0.11.0-dev.3663), and replaced with @min and @max instead.

Solution

Added compatibility with versions of Zig both before and after that PR with the help of some comptime version checking.
Replaced the deprecated calls with @min and @max. See the comment below.

Testing

Tested with both the latest git commit of the zig repository, and the latest version on the website, which as of writing this PR were:
Website: 0.11.0-dev.3658
Latest Commit: 0.11.0-dev.3678 ziglang/zig@f043071

Both passed all 11 checks.

@FalsePattern
Copy link
Contributor Author

FalsePattern commented Jun 17, 2023

Upon further inspection, @min and @max are compatible with 0.11.0-dev.3658, the current "public" release on the website, so the fallback compat here was not required, replaced with a simple upgrade instead.

@SuperAuguste SuperAuguste merged commit 2fd03fc into ziglibs:main Jun 17, 2023
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.

3 participants