-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update to focal #52
Update to focal #52
Conversation
I can't wait to see how many things will break haha. |
A way to work around this kind of broken gir file would be to convert unknown types that are only used as pointers to generic pointers ( Doing that in the parser seems a bit tricky though, maybe @EPashkin can see an easy way to do this? |
@sdroege If you talk about Pango pointers, then I think that it need be fixed in this repo replacing it with "name=gpointer c:type=gpointer". |
The reason why I think this should be in gir (instead of fixing the XML) is because the gir files are valid like this and we should probably handle valid gir files. Not having the type happens for "external" or unknown types in gir files. In this case to solve it properly we would have to also add harfbuzz bindings (in addition to fixing the gir file), in other cases there is no proper fix (for example for various system types, say a Windows
I was suggesting to implement that, maybe only for |
As fast workaround to get the focal gir files in, fixing the harfbuzz types in pango by putting these cases into fix.sh seems like a good approach though. @bilelmoussaoui you do that? |
Hm, My comment about #54 lost (or just not added). |
Change to fix Pango and undo gtk Pango.ShowFlags's fix diff --git a/fix.sh b/fix.sh
index 61fb675..828f02a 100755
--- a/fix.sh
+++ b/fix.sh
@@ -98,7 +98,14 @@ xmlstarlet ed -P -L \
-a '//_:callback[@name="ParseErrorFunc"]/_:parameters/_:parameter[@name="section"]/_:type[not(@name) and @c:type="gconstpointer"]' -type attr -n "name" -v "gconstpointer" \
Gsk-4.0.gir
-# fix unpublished Pango.ShowFlags gtk 4.0
+# fix harfbuzz types in pango
xmlstarlet ed -P -L \
- -u '//_:type[@name="Pango.ShowFlags"]'/@name -v "guint" \
- Gtk-4.0.gir
+ -i '///_:type[not(@name) and @c:type="hb_font_t*"]' -t 'attr' -n 'name' -v "gconstpointer" \
+ -u '//_:type[@c:type="hb_font_t*"]/@c:type' -v "gconstpointer" \
+ -i '///_:array[not(@name) and @c:type="hb_feature_t*"]' -t 'attr' -n 'name' -v "gconstpointer" \
+ -r '///_:array[@c:type="hb_feature_t*"]' -v "type" \
+ -d '//_:type[@c:type="hb_feature_t*"]/*' \
+ -d '//_:type[@c:type="hb_feature_t*"]/@length' \
+ -d '//_:type[@c:type="hb_feature_t*"]/@zero-terminated' \
+ -u '//_:type[@c:type="hb_feature_t*"]/@c:type' -v "gconstpointer" \
+ Pango-1.0.gir
|
Right, thanks! @sdroege I'm planning to work on it before/during the hackfest |
@bilelmoussaoui Any updates here? |
I have been busy doing something else lately. Will get back to this next week :) |
I somehow messed my fork, I'm going to reopen a new merge request with the required changes |
This updates the release to focal and runs dl.sh afterwards.