Failing to generate bindings for ECal-2.0.gir because of Camel-1.2.gir #341
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi#341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I'm trying to build a desktop app, that need to acces calendar informations from Evolution Data Server.
So, I tried to generate bindings for ECal-2.0.gir with java-gi, but it failed.
I'm using Asahi/Fedora 43 and java-gi:0.14.1.
With this command line (wich includes dependencies for ECal) :
java-gi -d org.gnome /usr/share/gir-1.0/Camel-1.2.gir /usr/share/gir-1.0/Json-1.0.gir /usr/share/gir-1.0/EDataServer-1.2.gir /usr/share/gir-1.0/ICalGLib-3.0.gir /usr/share/gir-1.0/ECal-2.0.gri
I get the following error :
not a valid name: Camel,camelError
Any idea about what's going wrong ?
Hi, thanks for trying out java-gi!
You can fix the error if you make a local copy of
Camel-1.2.girand update line 19. Changec:identifier-prefixes="Camel,camel"toc:identifier-prefixes="Camel". Java-GI doesn't expect multiple values here. I'll fix that in the next java-gi release, but at least this is a workaround.To generate the bindings, you also need to include
libxml2.gir.I tried to compile the resulting bindings, but I'm afraid that there are multiple issues in the generated code. It should not be very hard to fix those manually. In most cases you can just delete the offending method.
Thanks :-)
I copied and updated Camel-1.2.gir.
However, I get another error when running this command line :
java-gi -S -d org.gnome /usr/share/gir-1.0/libxml2-2.0.gir ./Camel-1.2.gir /usr/share/gir-1.0/Json-1.0.gir /usr/share/gir-1.0/EDataServer-1.2.gir /usr/share/gir-1.0/ICalGLib-3.0.gir /usr/share/gir-1.0/ECal-2.0.gri
java.lang.IllegalArgumentException: gir file ECal-2.0.gri is invalid
at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:181)
at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:59)
at info.picocli@4.7.7/picocli.CommandLine.executeUserObject(CommandLine.java:2031)
at info.picocli@4.7.7/picocli.CommandLine.access$1500(CommandLine.java:148)
at info.picocli@4.7.7/picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at info.picocli@4.7.7/picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at info.picocli@4.7.7/picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at info.picocli@4.7.7/picocli.CommandLine.execute(CommandLine.java:2174)
at org.javagi.generator/org.javagi.JavaGI.main(JavaGI.java:130)
Any idea ?
Yes, typo, "gri" should be "gir".
With your help, bindings generation works without error, thanks.