bleakgrey / tootle

GTK-based Mastodon client for Linux
GNU General Public License v3.0
404 stars 62 forks source link

Fix Build with vala 0.54.1 #337

Open genofire opened 2 years ago

genofire commented 2 years ago

Build context:

Logs:

(Terminal logs are often invaluable. If you can, launch the app from terminal with com.github.bleakgrey.tootle and paste the output here)

The Meson build system
Version: 0.59.1
Source dir: ~/tootle
Build dir: ~/tootle/build
Build type: native build
Project name: com.github.bleakgrey.tootle
Project version: 2.0-alpha2
C compiler for the host machine: cc (gcc 11.1.0 "cc (GCC) 11.1.0")
C linker for the host machine: cc ld.bfd 2.36.1
Vala compiler for the host machine: valac (valac 0.54.1)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency gtk4 found: YES 4.4.0
Run-time dependency libadwaita-1 found: YES 1.0.0-alpha.2
Configuring Build.vala using configuration
Run-time dependency glib-2.0 found: YES 2.70.0
Run-time dependency gee-0.8 found: YES 0.20.4
Run-time dependency libsoup-2.4 found: YES 2.74.0
Run-time dependency json-glib-1.0 found: YES 1.6.6
Run-time dependency libxml-2.0 found: YES 2.9.12
Run-time dependency libsecret-1 found: YES 0.20.4
Program meson/post_install.py found: YES (/home/genofire/.cache/yay/tootle-git/src/tootle/meson/post_install.py)
Build targets in project: 8

Found ninja-1.10.2 at /usr/bin/ninja
ninja: Entering directory `build'
[6/81] Compiling Vala source Build.vala ../src/Application.vala ../src/Utils/Host.vala ../...Views/Search.vala ../src/Views/Hashtag.vala ../src/Views/Lists.vala ../src/Views/List.val
FAILED: com.github.bleakgrey.tootle.p/build/Build.c com.github.bleakgrey.tootle.p/src/Application.c com.github.bleakgrey.tootle.p/src/Utils/Host.c com.github.bleakgrey.tootle.p/src/Utils/Html.c com.github.bleakgrey.tootle.p/src/Utils/DateTime.c com.github.bleakgrey.tootle.p/src/Services/Accounts/InstanceAccount.c com.github.bleakgrey.tootle.p/src/Services/Accounts/AccountStore.c com.github.bleakgrey.tootle.p/src/Services/Accounts/Places.c com.github.bleakgrey.tootle.p/src/Services/Accounts/SecretAccountStore.c com.github.bleakgrey.tootle.p/src/Services/Accounts/AccountHolder.c com.github.bleakgrey.tootle.p/src/Services/Accounts/Mastodon/Account.c com.github.bleakgrey.tootle.p/src/Services/Cache/AbstractCache.c com.github.bleakgrey.tootle.p/src/Services/Cache/EntityCache.c com.github.bleakgrey.tootle.p/src/Services/Cache/ImageCache.c com.github.bleakgrey.tootle.p/src/Services/Network/Network.c com.github.bleakgrey.tootle.p/src/Services/Network/Request.c com.github.bleakgrey.tootle.p/src/Services/Network/Streams.c com.github.bleakgrey.tootle.p/src/Services/Network/Streamable.c com.github.bleakgrey.tootle.p/src/Services/Settings.c com.github.bleakgrey.tootle.p/src/API/Account.c com.github.bleakgrey.tootle.p/src/API/AccountField.c com.github.bleakgrey.tootle.p/src/API/Relationship.c com.github.bleakgrey.tootle.p/src/API/Mention.c com.github.bleakgrey.tootle.p/src/API/Tag.c com.github.bleakgrey.tootle.p/src/API/Status.c com.github.bleakgrey.tootle.p/src/API/Notification.c com.github.bleakgrey.tootle.p/src/API/Attachment.c com.github.bleakgrey.tootle.p/src/API/Conversation.c com.github.bleakgrey.tootle.p/src/API/List.c com.github.bleakgrey.tootle.p/src/API/SearchResults.c com.github.bleakgrey.tootle.p/src/API/Entity.c com.github.bleakgrey.tootle.p/src/Widgets/Widgetizable.c com.github.bleakgrey.tootle.p/src/Widgets/Background.c com.github.bleakgrey.tootle.p/src/Widgets/Avatar.c com.github.bleakgrey.tootle.p/src/Widgets/RichLabel.c com.github.bleakgrey.tootle.p/src/Widgets/Status.c com.github.bleakgrey.tootle.p/src/Widgets/Notification.c com.github.bleakgrey.tootle.p/src/Widgets/Conversation.c com.github.bleakgrey.tootle.p/src/Widgets/Attachment/Box.c com.github.bleakgrey.tootle.p/src/Widgets/Attachment/Item.c com.github.bleakgrey.tootle.p/src/Widgets/Attachment/Image.c com.github.bleakgrey.tootle.p/src/Widgets/LockableToggleButton.c com.github.bleakgrey.tootle.p/src/Widgets/StatusActionButton.c com.github.bleakgrey.tootle.p/src/Widgets/RelationshipButton.c com.github.bleakgrey.tootle.p/src/Widgets/MarkupView.c com.github.bleakgrey.tootle.p/src/Dialogs/Saveable.c com.github.bleakgrey.tootle.p/src/Dialogs/NewAccount.c com.github.bleakgrey.tootle.p/src/Dialogs/MainWindow.c com.github.bleakgrey.tootle.p/src/Dialogs/Preferences.c com.github.bleakgrey.tootle.p/src/Dialogs/ListEditor.c com.github.bleakgrey.tootle.p/src/Dialogs/Composer/Dialog.c com.github.bleakgrey.tootle.p/src/Dialogs/Composer/Page.c com.github.bleakgrey.tootle.p/src/Dialogs/Composer/EditorPage.c com.github.bleakgrey.tootle.p/src/Dialogs/Composer/AttachmentsPage.c com.github.bleakgrey.tootle.p/src/Dialogs/Composer/PollPage.c com.github.bleakgrey.tootle.p/src/Views/Base.c com.github.bleakgrey.tootle.p/src/Views/ContentBase.c com.github.bleakgrey.tootle.p/src/Views/TabbedBase.c com.github.bleakgrey.tootle.p/src/Views/Sidebar.c com.github.bleakgrey.tootle.p/src/Views/Main.c com.github.bleakgrey.tootle.p/src/Views/Timeline.c com.github.bleakgrey.tootle.p/src/Views/Home.c com.github.bleakgrey.tootle.p/src/Views/Local.c com.github.bleakgrey.tootle.p/src/Views/Federated.c com.github.bleakgrey.tootle.p/src/Views/Notifications.c com.github.bleakgrey.tootle.p/src/Views/Conversations.c com.github.bleakgrey.tootle.p/src/Views/Bookmarks.c com.github.bleakgrey.tootle.p/src/Views/Thread.c com.github.bleakgrey.tootle.p/src/Views/Profile.c com.github.bleakgrey.tootle.p/src/Views/Favorites.c com.github.bleakgrey.tootle.p/src/Views/Search.c com.github.bleakgrey.tootle.p/src/Views/Hashtag.c com.github.bleakgrey.tootle.p/src/Views/Lists.c com.github.bleakgrey.tootle.p/src/Views/List.c
valac -C --pkg libadwaita-1 --pkg gtk4 --pkg libsecret-1 --pkg libxml-2.0 --pkg json-glib-1.0 --pkg libsoup-2.4 --pkg gee-0.8 --target-glib 2.30.0 --pkg glib-2.0 --color=always --directory com.github.bleakgrey.tootle.p --basedir ../ --gresources=../data/gresource.xml Build.vala ../src/Application.vala ../src/Utils/Host.vala ../src/Utils/Html.vala ../src/Utils/DateTime.vala ../src/Services/Accounts/InstanceAccount.vala ../src/Services/Accounts/AccountStore.vala ../src/Services/Accounts/Places.vala ../src/Services/Accounts/SecretAccountStore.vala ../src/Services/Accounts/AccountHolder.vala ../src/Services/Accounts/Mastodon/Account.vala ../src/Services/Cache/AbstractCache.vala ../src/Services/Cache/EntityCache.vala ../src/Services/Cache/ImageCache.vala ../src/Services/Network/Network.vala ../src/Services/Network/Request.vala ../src/Services/Network/Streams.vala ../src/Services/Network/Streamable.vala ../src/Services/Settings.vala ../src/API/Account.vala ../src/API/AccountField.vala ../src/API/Relationship.vala ../src/API/Mention.vala ../src/API/Tag.vala ../src/API/Status.vala ../src/API/Notification.vala ../src/API/Attachment.vala ../src/API/Conversation.vala ../src/API/List.vala ../src/API/SearchResults.vala ../src/API/Entity.vala ../src/Widgets/Widgetizable.vala ../src/Widgets/Background.vala ../src/Widgets/Avatar.vala ../src/Widgets/RichLabel.vala ../src/Widgets/Status.vala ../src/Widgets/Notification.vala ../src/Widgets/Conversation.vala ../src/Widgets/Attachment/Box.vala ../src/Widgets/Attachment/Item.vala ../src/Widgets/Attachment/Image.vala ../src/Widgets/LockableToggleButton.vala ../src/Widgets/StatusActionButton.vala ../src/Widgets/RelationshipButton.vala ../src/Widgets/MarkupView.vala ../src/Dialogs/Saveable.vala ../src/Dialogs/NewAccount.vala ../src/Dialogs/MainWindow.vala ../src/Dialogs/Preferences.vala ../src/Dialogs/ListEditor.vala ../src/Dialogs/Composer/Dialog.vala ../src/Dialogs/Composer/Page.vala ../src/Dialogs/Composer/EditorPage.vala ../src/Dialogs/Composer/AttachmentsPage.vala ../src/Dialogs/Composer/PollPage.vala ../src/Views/Base.vala ../src/Views/ContentBase.vala ../src/Views/TabbedBase.vala ../src/Views/Sidebar.vala ../src/Views/Main.vala ../src/Views/Timeline.vala ../src/Views/Home.vala ../src/Views/Local.vala ../src/Views/Federated.vala ../src/Views/Notifications.vala ../src/Views/Conversations.vala ../src/Views/Bookmarks.vala ../src/Views/Thread.vala ../src/Views/Profile.vala ../src/Views/Favorites.vala ../src/Views/Search.vala ../src/Views/Hashtag.vala ../src/Views/Lists.vala ../src/Views/List.vala
../src/API/Attachment.vala:7.2-7.28: error: Name `_preview_url' is not valid for a GLib.Object property
    public string? _preview_url { get; set; }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/API/Attachment.vala:10.17-10.33: error: invalid left operand
        get { return (this._preview_url == null || this._preview_url == "") ? url : _preview_url; }
                      ^^^^^^^^^^^^^^^^^
../src/Services/Network/Network.vala:69.16-69.37: error: The name `get_phrase' does not exist in the context of `Soup.Status' (libsoup-2.4)
        var reason = Soup.Status.get_phrase (code);
                     ^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Network/Network.vala:55.6-55.22: warning: unhandled error `GLib.Error'
                    cb (session, msg);
                    ^^^^^^^^^^^^^^^^^
../src/Services/Network/Network.vala:92.4-92.17: warning: unhandled error `GLib.Error'
            cb (node, msg);
            ^^^^^^^^^^^^^^
../src/Services/Network/Streams.vala:70.14-70.62: warning: unhandled error `GLib.Error'
                socket = network.session.websocket_connect_async.end (res);
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Network/Streamable.vala:23.2-23.40: error: Name `_connection_url' is not valid for a GLib.Object property
    public abstract string? _connection_url { get; set; }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Network/Streamable.vala:32.24-32.38: error: Invalid type for argument 1
        streams.unsubscribe (_connection_url, this);
                             ^^^^^^^^^^^^^^^
../src/Views/Base.vala:64.36-64.39: warning: Argument 1: Cannot pass null to non-null parameter type
        var title = new Adw.WindowTitle (null, null);
                                         ^^^^
../src/Views/Base.vala:64.42-64.45: warning: Argument 2: Cannot pass null to non-null parameter type
        var title = new Adw.WindowTitle (null, null);
                                               ^^^^
../src/Views/ContentBase.vala:58.10-58.40: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        return (obj as Widgetizable).to_widget ();
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/ContentBase.vala:58.10-58.43: warning: unhandled error `Tootle.Oopsie'
        return (obj as Widgetizable).to_widget ();
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/API/Status.vala:31.5-31.23: error: Name `_url' is not valid for a GLib.Object property
    public string? _url { get; set; }
    ^^^^^^^^^^^^^^^^^^^
../src/API/Status.vala:37.13-37.21: error: invalid left operand
        if (this._url == null) {
            ^^^^^^^^^
../src/Widgets/Attachment/Box.vala:43.4-43.33: warning: unhandled error `Tootle.Oopsie'
            var widget = item.to_widget ();
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Cache/EntityCache.vala:19.13-19.41: warning: unhandled error `GLib.Error'
            entity = Entity.from_json (type, node);
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Cache/EntityCache.vala:30.14-30.42: warning: unhandled error `GLib.Error'
                entity = Entity.from_json (type, node);
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/Timeline.vala:151.43-151.56: warning: unhandled error `GLib.Error'
        var entity = Entity.from_json (accepts, ev.get_node ());
                                                ^^^^^^^^^^^^^^
../src/Views/Timeline.vala:151.3-151.57: warning: unhandled error `GLib.Error'
        var entity = Entity.from_json (accepts, ev.get_node ());
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Widgets/Status.vala:247.13-247.69: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        var mgr = (content_column.get_parent () as Grid).get_layout_manager ();
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/TabbedBase.vala:16.3-16.38: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        (states.get_parent () as Box).remove (states);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/TabbedBase.vala:18.3-18.40: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        (scrolled.get_parent () as Box).remove (scrolled);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Accounts/Mastodon/Account.vala:22.18-22.58: warning: unhandled error `GLib.Error'
            var account = Entity.from_json (typeof (Account), node) as Account;
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Dialogs/Composer/EditorPage.vala:40.23-40.88: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        status.visibility = (visibility_button.selected_item as InstanceAccount.Visibility).id;
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/Timeline.vala:135.2-135.31: error: Name `_connection_url' is not valid for a GLib.Object property
    public string? _connection_url { get; set; }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Widgets/RelationshipButton.vala:45.42-45.45: warning: Argument 2: Cannot pass null to non-null parameter type
                    activate_action ("domain_blocking", null);
                                                        ^^^^
../src/Widgets/RelationshipButton.vala:47.40-47.43: warning: Argument 2: Cannot pass null to non-null parameter type
                    activate_action ("view.blocking", null);
                                                      ^^^^
../src/API/Entity.vala:107.5-107.43: warning: unhandled error `GLib.Error'
                var obj = Entity.from_json (type, elem);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/API/Account.vala:64.5-64.29: warning: unhandled error `GLib.Error'
                account.resolve.end (res).open ();
                ^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Accounts/InstanceAccount.vala:188.49-188.62: warning: unhandled error `GLib.Error'
        var entity = create_entity<API.Notification> (ev.get_node ());
                                                      ^^^^^^^^^^^^^^
../src/Services/Accounts/InstanceAccount.vala:188.3-188.63: warning: unhandled error `GLib.Error'
        var entity = create_entity<API.Notification> (ev.get_node ());
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Services/Accounts/InstanceAccount.vala:180.2-180.31: error: Name `_connection_url' is not valid for a GLib.Object property
    public string? _connection_url { get; set; }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 9 error(s), 23 warning(s)
ninja: build stopped: subcommand failed.
1peter10 commented 2 years ago

This is also reproducible when changing "runtime-version" to 41 in com.github.bleakgrey.tootle.json.

harmathy commented 2 years ago

This also breaks build of 1.0 (along with #320)

FedericoCeratto commented 1 year ago

This is also blocking the packaging of 2.0-alpha1 for Debian and derivatives.

fortysixandtwo commented 1 year ago

Oh, I didn't realize two people had already made similar changes :o

fortysixandtwo commented 1 year ago

I'll have another go at it in the next couple of days