glfw: update to zig latest master branch #116

Closed
BratishkaErik wants to merge 2 commits from BratishkaErik-patch-1 into main
BratishkaErik commented 2021-12-06 11:36:42 +00:00 (Migrated from github.com)
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

Microfix for this:

./deps/mach/glfw/system_sdk.zig:95:38: error: expected type '*std.mem.Allocator', found 'std.mem.Allocator'
    const sdk_root_dir = getSdkRoot(b.allocator, options.github_org, options.linux_x86_64, options.linux_x86_64_revision) catch unreachable;
                                     ^
/usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here
//! The standard memory allocation interface.
^
./deps/mach/glfw/system_sdk.zig:72:38: error: expected type '*std.mem.Allocator', found 'std.mem.Allocator'
    const sdk_root_dir = getSdkRoot(b.allocator, options.github_org, sdk_name, sdk_revision) catch unreachable;
                                     ^
/usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here
//! The standard memory allocation interface.
^
./deps/mach/glfw/system_sdk.zig:123:36: error: expected type 'std.mem.Allocator', found '*std.mem.Allocator'
    if (std.process.getEnvVarOwned(allocator, "SDK_PATH")) |sdk_path| {
                                   ^
/usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here
//! The standard memory allocation interface.

See https://github.com/ziglang/zig/pull/10055

- [X] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right. Microfix for this: ``` ./deps/mach/glfw/system_sdk.zig:95:38: error: expected type '*std.mem.Allocator', found 'std.mem.Allocator' const sdk_root_dir = getSdkRoot(b.allocator, options.github_org, options.linux_x86_64, options.linux_x86_64_revision) catch unreachable; ^ /usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here //! The standard memory allocation interface. ^ ./deps/mach/glfw/system_sdk.zig:72:38: error: expected type '*std.mem.Allocator', found 'std.mem.Allocator' const sdk_root_dir = getSdkRoot(b.allocator, options.github_org, sdk_name, sdk_revision) catch unreachable; ^ /usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here //! The standard memory allocation interface. ^ ./deps/mach/glfw/system_sdk.zig:123:36: error: expected type 'std.mem.Allocator', found '*std.mem.Allocator' if (std.process.getEnvVarOwned(allocator, "SDK_PATH")) |sdk_path| { ^ /usr/lib/zig/std/mem/Allocator.zig:1:1: note: std.mem.Allocator declared here //! The standard memory allocation interface. ``` See https://github.com/ziglang/zig/pull/10055
InKryption commented 2021-12-06 13:45:12 +00:00 (Migrated from github.com)

You could also go in and do the same in 'glfw/src/Image.zig', 'glfw/src/GammaRamp.zig', 'glfw/src/Window.zig', 'glfw/src/Monitor.zig', and I think 'glfw/src/Cursor.zig'.

You could also go in and do the same in 'glfw/src/Image.zig', 'glfw/src/GammaRamp.zig', 'glfw/src/Window.zig', 'glfw/src/Monitor.zig', and I think 'glfw/src/Cursor.zig'.
InKryption commented 2021-12-06 15:47:15 +00:00 (Migrated from github.com)

btw, for future reference, the practice is to prefix issues and pull requests related specifically to the mach-glfw subtree with 'glfw:', both in commits and titles. Slimsag will probably squash the commits here and have it prefixed appropriately though, so no real issues here.

btw, for future reference, the practice is to prefix issues and pull requests related specifically to the mach-glfw subtree with 'glfw:', both in commits and titles. Slimsag will probably squash the commits here and have it prefixed appropriately though, so no real issues here.
BratishkaErik commented 2021-12-06 15:53:48 +00:00 (Migrated from github.com)

OK, I'll make a note of that.

OK, I'll make a note of that.
emidoots (Migrated from github.com) approved these changes 2021-12-07 01:15:57 +00:00
emidoots (Migrated from github.com) left a comment

Beautiful, thank you!

Beautiful, thank you!
BratishkaErik commented 2021-12-07 01:51:14 +00:00 (Migrated from github.com)

Maybe you need to update zig in workflows?

Maybe you need to update zig in workflows?
emidoots commented 2021-12-07 03:08:39 +00:00 (Migrated from github.com)

Yep, on it right now. I also need to update the other Zig code in this repository unrelated to GLFW - should be easy enough though

Yep, on it right now. I also need to update the other Zig code in this repository unrelated to GLFW - should be easy enough though
emidoots commented 2021-12-07 04:04:11 +00:00 (Migrated from github.com)

Merged via #117 where I added a few more commits on top of yours, thanks for sending this!

Merged via #117 where I added a few more commits on top of yours, thanks for sending this!

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
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
hexops/mach!116
No description provided.