VTE 2.91 support

Bug #1375346 reported by Maxime Gauduin
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Terminal
Fix Released
High
Cody Garver
elementary OS
Fix Released
Wishlist
Cody Garver

Bug Description

Hi guys,

With GNOME 3.14 comes a new VTE with API changes. I tried to port the existing code, but while some things are straightforward, some aren't, and my not knowing Vala or C doesn't help.

Arch Linux will probably keep VTE 2.90 lying around until all apps depending on it have been ported to 2.91, but it would be nice if you could have a look at it when you have time.

Related branches

Revision history for this message
Anatol Pomozov (anatol) wrote :

We also filed similar ticket to sakura project https://bugs.launchpad.net/sakura/+bug/1337962 I think that vte API changes affect Pantheon in similar way. Here is incomplete list of changes:

 - visual bell support has been removed https://bugzilla.gnome.org/show_bug.cgi?id=602726#c19
 - background images support has been removed, it was marked as deprecated since 0.34. Can't google any rationale for this.
 - a lot of deprecated API has been removed. Many of these API functions were marked deprecated in vte 0.34. If you support 0.34+ then you can update the function and still stay both gnome 3.12 and 3.14 compatible.

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

i am having trouble finding the 2.91.vapi file, does someone has a generated one? or should i generate it myself?

Revision history for this message
Maxime Gauduin (alucryd) wrote :

You can find it in our tve package here: https://www.archlinux.org/packages/testing/x86_64/vte3/download/
It's in "usr/share/vala/vapi/vte-2.91.vapi"

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

i have the git source of vte build and gir file available but the vapigen segfaults ? anyone the same problem?

vapigen --library Vte-2.91 --pkg Gdk-3.0 --pkg Gtk-3.0 --pkg Pango-1.0 Vte-2.91.gir

ill try vala git now

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

sorry don't know how i could miss that, thanks!

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

i have already fixed al the changes including the Color to RGBA change but one thing is blocking me for the moment:

the Vte.Terminal.fork_command_full is not in the vapi. Is it still in the c code or is the api removed?

Revision history for this message
Maxime Gauduin (alucryd) wrote :

fork_command_full has been replaced by spawn_sync, there is one additional argument after the pid now, it's a GCancellable type.

See the new header: https://paste.xinu.at/wQbC/

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

should work now , added a branch please report any error , inclusieve styling error, its my first branch to the elementary project

Revision history for this message
Maxime Gauduin (alucryd) wrote :

Everything seems to work here, thanks a lot for the quick port!

Revision history for this message
Anatol Pomozov (anatol) wrote :

Yay! Thanks Steven and Maxime for quick problem resolution. I will test it later.

It is a good chance say thanks to ElementaryOS for your high-quality software and quick development cycle. Your work makes pantheon Arch packages better and better each day!

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

it works but im stuck on how to fix the backwards compatibility for vte2.90, in the cmakelist.txt and in the code itself, the vapi change breaks the working on older versions,

is it best to keep a second branch around or find a way to use them both? with defines and the like?

Revision history for this message
Anatol Pomozov (anatol) wrote :

Vala has preprocessor https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor , I've never used it myself. It might be possible to keep both api versions in the file.

Another option is to submit all the backward compatible changes to repository and keep the rest in a branch or even just as a patch in this ticket. All bleeding edge distros will be needed to patch their packages. Later, when you ready to move to vte-2.91 you'll submit these changes.

Revision history for this message
Maxime Gauduin (alucryd) wrote :

I'd say find a way to support both is better. I've attached a patch for CMakeLists.txt to check for both and add a VTE_VER define to gcc. I'm not sure how it translates for the vala precompiler though.

Revision history for this message
Anatol Pomozov (anatol) wrote :

It would be better to test the vte version in source. Maybe it is possible to use version macros VTE_CHECK_VERSION() in Vala?? https://developer.gnome.org/vte/unstable/vte-Version-Information.html#VTE-MAJOR-VERSION:CAPS

Revision history for this message
Anatol Pomozov (anatol) wrote :

https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor states:
"It's not possible to define a preprocessor symbol inside the Vala code (like with C). The only way to define a symbol is to feed it through the valac option -D."

So the only version is to pass vte versions through cmake.

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

thanks maxime i used your patch as inspiration and adjusted the cmakelists and the source code to support both versions,

the color and rgba mismatch made the code a little bigger though, once everyone switches over this code might be deleted ;)

Changed in pantheon-terminal:
assignee: nobody → Steven Vanden Branden (stevenvandenbrandenstift)
Changed in pantheon-terminal:
status: New → Confirmed
Changed in pantheon-terminal:
status: Confirmed → In Progress
Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

ps is the in progress status correct for awaiting a review of this?

or should i set the fix commited? or does this mean that it is already merged?

Revision history for this message
David Gomes (davidgomes) wrote :

In Progress is the correct status.

Revision history for this message
David Gomes (davidgomes) wrote :

We use Fix Commited for things that have been merged in trunk already.

Revision history for this message
Anatol Pomozov (anatol) wrote :

What is the status of tis issue? Is the fix commited and be available in the next release? When can we expect the next release that correctly works with VTE-2.91?

Cody Garver (codygarver)
Changed in pantheon-terminal:
assignee: Steven Vanden Branden (stevenvandenbrandenstift) → Cody Garver (codygarver)
importance: Undecided → High
milestone: none → loki-beta1
Cody Garver (codygarver)
Changed in pantheon-terminal:
status: In Progress → Fix Committed
Revision history for this message
Anatol Pomozov (anatol) wrote :

Change http://bazaar.launchpad.net/~elementary-apps/pantheon-terminal/trunk/revision/754 closes this bug.

Cody, when do you plan to make a new release that includes vte 2.91 update?

Changed in pantheon-terminal:
milestone: loki-beta1 → loki-alpha1
Cody Garver (codygarver)
Changed in elementaryos:
assignee: nobody → Cody Garver (codygarver)
importance: Undecided → Wishlist
milestone: none → loki-alpha1
status: New → Fix Committed
Cody Garver (codygarver)
Changed in pantheon-terminal:
status: Fix Committed → Fix Released
Greg Turner (gmt)
Changed in elementaryos:
status: Fix Committed → Fix Released
Cody Garver (codygarver)
Changed in elementaryos:
status: Fix Released → Fix Committed
Changed in elementaryos:
status: Fix Committed → Fix Released
milestone: loki-alpha1 → loki-rc1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.