Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

WIP: Fix build with newer vala and libadwaita #358

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fortysixandtwo
Copy link

This builds, but raises some criticals currently.

Just wanted to put it out there to avoid work duplication.

Fixes #337

The migration guide says:

The can-swipe-back and can-swipe-forward properties have been renamed
to AdwLeaflet:can-navigate-back and AdwLeaflet:can-navigate-forward,
along with their accessors.
The new properties also handle keyboard and mouse shortcuts
in addition to swipes.
../src/Application.vala:46.49-52.3: error: value is less accessible than constant `Tootle.Application.app_entries'
   46 |                 public const GLib.ActionEntry[] app_entries = {
      |                                                               ^
   47 |                         { "about", about_activated },
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 |                         { "compose", compose_activated },
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   49 |                         { "back", back_activated },
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   50 |                         { "refresh", refresh_activated },
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   51 |                         { "search", search_activated },
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   52 |                 };
      |                 ~
…r valac)

Vala started checking property names in
https://gitlab.gnome.org/GNOME/vala/-/commit/38d61fbff037687ea4772e6df85c7e22a74b335e

Resulting in the folowing example build failure:

../src/API/Status.vala:31.5-31.23: error: Name `_url' is not valid for a GLib.Object property
   31 |     public string? _url { get; set; }

This commit removes leading underscores and makes other small
adjustments to variable names.
From the migration guide:

GtkButtonBox has been removed. Use a GtkBox instead.
@fortysixandtwo
Copy link
Author

FYI: some patches to use make 1.0 build with latest valac: (pretty much the same ones that are applied here)
can be found here: https://salsa.debian.org/devrtz/tootle/-/commits/fix_1.0

@CaptainMorgan12
Copy link

might be related as i am getting build errors:

`lots more warnings.....

./src/API/Entity.vala:105.5-105.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:181.49-181.62: warning: unhandled error GLib.Error' var entity = create_entity<API.Notification> (ev.get_node ()); ^^^^^^^^^^^^^^ ../src/Services/Accounts/InstanceAccount.vala:181.3-181.63: warning: unhandled error GLib.Error'
var entity = create_entity<API.Notification> (ev.get_node ());
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Dialogs/NewAccount.vala:214.3-214.21: error: The name can_swipe_back' does not exist in the context of Adw.Leaflet' (libadwaita-1)
deck.can_swipe_back = deck.visible_child != done_step;
^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 21 warning(s)
ninja: build stopped: subcommand failed.
`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Build with vala 0.54.1
2 participants