-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
Started test build 95847 |
Build 95847 successful
|
Converted to draft as it appears that the patch broke deserialization |
@cagatay-y Thanks for diving into this issue! If you manage to fix this, it would also solve bleakgrey/tootle#353. |
A nullable cannot be a GObject property. Change the enum property that caused the error to be non-nullable and add an enum case for what was normally denoted by null.
6794079
to
414008a
Compare
Started test build 95876 |
Build 95876 successful
|
Turns out the deserialization error was a false alarm: The error was also present on the current release on Flathub with version 40. The visible problem was notification type information such as "Reposted by …", "Favorited by …", etc. not being shown. The original workaround of making the property a non-GObject one caused this problem because it broke the property change notifications, which were needed to show the correct notification type. This patch instead makes the property non-nullable and adds a NONE case to the enum for cases which were previously handled with null. |
The notification type was set to erroneously null and it was interpreted as the enum case with integer value 0 (the first one).
Started test build 95878 |
Build 95878 successful
|
I should review more carefully before pushing. Hopefully, the third time is the charm. |
@hfiguiere can you merge this? I can't wait to update my local instance. |
@cagatay-y ^^^^ |
Although I didn't see another problem after the last commit to the PR branch, it would be great to have an additional person review or test the update. I didn't want to merge my own PR. |
Merging our own PR is what is expected from the maintainer (you). There is no review process for them, and I surely don't have the bandwidth. But they run CI (which is important). |
@harmathy, would you be interested in taking a look? If there is not any feedback, I will merge tomorrow. |
@cagatay-y, I added your patch to to the AUR package: No issues! Works great! Feel free to merge! |
Add patch by Çağatay Yiğit Şahin from flathub/com.github.bleakgrey.tootle#22
Based on #21. I could not figure out a way to suggest the addition of a file to a PR, so I created a separate PR based on it. My reasoning for the patch is as follows.
Trying to build the PR with GNOME 42, the error I got was the following:
Searching the Vala compiler repository, the error seems to be emitted from https://gitlab.gnome.org/GNOME/vala/-/blob/main/vala/valapropertyaccessor.vala#L222. I assume that the first part of the condition is true because the property is marked as
construct
. For the second part, I checked theis_gobject_property
method. My assumption is that in our case the if clause that is taken to return false (and cause the error) is at line 454. When I check theis_gobject_property_type
method that is inside the condition, it returns false when the type of the property is an enum (whichAPI.NotificationType
is) and it is nullable (marked with the question mark).Based on https://naaando.gitbooks.io/the-vala-tutorial/content/en/4-object-oriented-programming/gobject-style-construction.html, the
constructor set
style is for GObject-style construction. I guess (based on the code trail above) the issue is that the type of the property is not compatible with that style. Changing the setting of the property in the constructor to "the Java/C#-style" allowed me to build the code with the version 42 of the GNOME runtime.