-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with ./gsk-4.0/path_point.cr #58
Comments
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
|
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! |
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. |
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
The text was updated successfully, but these errors were encountered: