Closed maximumsomething closed 1 year ago
Seems like either the latest valac for a Gtk update. It fails on Arch as well.
Fix committed (49d86c0) to development. Let's see if it breaks older stuff.
and of course it does
../src/utils.vala:17.9-17.33: error: `Gtk.CssProvider.load_from_string' is not available in gtk4 4.10.4. Use gtk4 >= 4.12
17 | provider.load_from_string(CSSSTR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/selection.vala:332.9-332.33: error: `Gtk.CssProvider.load_from_string' is not available in gtk4 4.10.4. Use gtk4 >= 4.12
332 | provider.load_from_string(css);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Compilation failed: 2 error(s), 0 warning(s)
Thank you so much Gtk developers.
I know very nothing about Vala and also don't know if this breaks older versions but provider.load_from_data(CSSSTR, CSSSTR.data.length)
seems to do the trick
The correct fix is already in the development branch (works in 4.10 and 4.12).
GTK is broken beyond redemption ...
$ valac --version
Vala 0.56.8
$ pkg-config --modversion gtk4
4.10.4
public void load_from_data ([CCode (array_length_cname = "length", array_length_pos = 1.1,
array_length_type = "gssize")] uint8[] data);
$ valac --version
Vala 0.56.11
$ pkg-config --modversion gtk4
4.10.5
[Version (since = "4.12")]
public void load_from_bytes (GLib.Bytes data);
[Version (deprecated = true, deprecated_since = "4.12")]
public void load_from_data (string data, ssize_t length);
...
[Version (since = "4.12")]
public void load_from_string (string str);
$ valac --version
Vala 0.56.11
$ pkg-config --modversion gtk4
4.10.4
[Version (since = "4.12")]
public void load_from_bytes (GLib.Bytes data);
[Version (deprecated = true, deprecated_since = "4.12")]
public void load_from_data (string data, ssize_t length);
[Version (since = "4.12")]
public void load_from_string (string str);
$ valac --version
Vala 0.56.12
$ pkg-config --modversion gtk4
4.12.0
[Version (since = "4.12")]
public void load_from_bytes (GLib.Bytes data);
[Version (deprecated = true, deprecated_since = "4.12")]
public void load_from_data (string data, ssize_t length);
[Version (since = "4.12")]
public void load_from_string (string str);
$ valac --version
Vala 0.56.7
$ pkg-config --modversion gtk4
4.10.4
public void load_from_data ([CCode (array_length_cname = "length",
array_length_pos = 1.1, array_length_type = "gssize")] uint8[] data);
$ valac --version
Vala 0.56.7
$ pkg-config --modversion gtk4
4.10.4
public void load_from_data ([CCode (array_length_cname = "length", array_length_pos = 1.1,
array_length_type = "gssize")] uint8[] data);
fixed by https://github.com/stronnag/wayfarer/commit/b31dced00aeb644e297fbe9a1bd1ef06745cf204 for all three variants of the GTK API.
Building on Debian. Here's the output of the build commands: