Open xenanthropy opened 1 year ago
GTK4 on ArchLinux still on 4.12, I'll wait 4.13 land there to fix this, so I don't need to compile gtk4 myself or install gtk4 4.13 from test repository.
BTW I good thing to do when reporting these kind of bugs is to paste the code for the generated function that had problems... maybe I should create some issue template on github, anyway, thanks for reporting!
GTK4 on ArchLinux still on 4.12, I'll wait 4.13 land there to fix this, so I don't need to compile gtk4 myself or install gtk4 4.13 from test repository.
BTW I good thing to do when reporting these kind of bugs is to paste the code for the generated function that had problems... maybe I should create some issue template on github, anyway, thanks for reporting!
Ah sorry, I wasn't fully aware that the code was generated! I'll do that now - this is the issue in question:
# Generator::NullableArrayPlan
center = if center.nil?
Void.null
else
center.to_unsafe
end
center = if center.nil?
being the problem line
Better copy the whole method declaration with annotation comments, etc. Usually it's possible to identify what's wrong with just that. Then I can try to reproduce the issue in the lib used on gi-crystal tests.
GskPath is a new API from GSK, so I don't have it here in my system yet. The weird thins is that the docs says "since 4.14", however you seems to have it on 4.13.
Ah, of course, here is the entire method:
def curvature(path : Gsk::Path,direction : Gsk::PathDirection,) : Graphene::Point
# gsk_path_point_get_curvature: (Method)
# @path:
# @direction:
# @center: (out) (nullable) (caller-allocates)
# Returns: (transfer none)
# Generator::NullableArrayPlan
center = if center.nil?
Void.null
else
center.to_unsafe
end
# Generator::CallerAllocatesPlan
center=Graphene::Point.new
# C call
_retval = LibGsk.gsk_path_point_get_curvature(to_unsafe, path, direction, center)
# Return value handling
center
end
i'll go ahead and attach the whole file as well, in case any extra details are needed from it! path_point.txt
Hmmm... it's a well known problem related to how to handle these out/nullable/optimal parameters in bindings.
BTW, if you don't need this method you can unblock yourself by changing GSK binding.yml file to:
namespace: Gsk
version: "4.0"
require_after:
- gi_crystal.cr
- render_node.cr
types:
RenderNode:
ignore_methods:
- ref
- unref
PathPoint:
ignore_methods:
- get_curvature
Hmmm... it's a well known problem related to how to handle these out/nullable/optimal parameters in bindings.
BTW, if you don't need this method you can unblock yourself by changing GSK binding.yml file to:
namespace: Gsk version: "4.0" require_after: - gi_crystal.cr - render_node.cr types: RenderNode: ignore_methods: - ref - unref PathPoint: ignore_methods: - get_curvature
Yeah I don't think i'm needing that method so thanks, that got me past it and thankfully no other methods had issues! Shall I close this or do you want me to leave it open as a reminder to look into when your GTK gets updated?
No, keep it open, the bug still exists. Even the fix need to be made on gi-crystal, IMO is ok the bug to be filed here since it's a bug in GSK bindings that are provided by this repository.
I just pushed these changes while this isn't proper fixed in gi-crystal. They will be available in next release.
I am using macOS and am getting the same error.
No, no, forget it. I updated shard.lock and all is well. Have a nice day.
Edit: I realize this is most likely an issue with gi-crystal, but I'll leave the issue here as it also affects this repo as well
after cloning the repo and running
shards install
, running./bin/gi-crystal
gives the following output:I'm not sure if I have improper versions of programs or what, I can provide extra information as needed!
crystal: 1.9.2 gtk+4: 4.13.0 gobject-introspection: 1.72.0