Bug 225476 - lang/vala - vala 0.36.9 generates incorrect vte-2.91.vapi for x11-toolkits/vte3, breaking x11/altyo build
Summary: lang/vala - vala 0.36.9 generates incorrect vte-2.91.vapi for x11-toolkits/vt...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Don Lewis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-27 00:46 UTC by Don Lewis
Modified: 2018-01-31 21:59 UTC (History)
3 users (show)

See Also:


Attachments
patch to unbreak x11/altyo build with vala 0.36.9 (1.36 KB, patch)
2018-01-27 00:46 UTC, Don Lewis
truckman: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer 2018-01-27 00:46:10 UTC
Created attachment 190091 [details]
patch to unbreak x11/altyo build with vala 0.36.9

After vala was upgraded to 0.36.9, the altyo build broke with these errors:

/wrkdirs/usr/ports/x11/altyo/work/AltYo-debian-0.4_rc19-linvinus1/altyo_terminal
.vala.c:5638:62: error: too few arguments to function call, expected 3, have 2
                        vte_terminal_set_encoding ((VteTerminal*) _tmp44_, _tmp4
5_);
                        ~~~~~~~~~~~~~~~~~~~~~~~~~
  ^
/usr/local/include/vte-2.91/vte/vteterminal.h:399:1: note: 'vte_terminal_set_enc
oding' declared here
_VTE_PUBLIC
^
/usr/local/include/vte-2.91/vte/vtemacros.h:42:21: note: expanded from macro '_V
TE_PUBLIC'
#define _VTE_PUBLIC __attribute__((__visibility__("default"))) extern
                    ^
/wrkdirs/usr/ports/x11/altyo/work/AltYo-debian-0.4_rc19-linvinus1/altyo_terminal
.vala.c:5642:59: error: too few arguments to function call, expected 3, have 2
                        vte_terminal_set_encoding ((VteTerminal*) _tmp46_, NULL)
;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~                              ^
/usr/local/include/vte-2.91/vte/vteterminal.h:399:1: note: 'vte_terminal_set_enc
oding' declared here


I'm not sure why this didn't show up with the vala upgrade to 0.36.4, since i see the same error when I downgrade back to that version.
Comment 1 Antoine Brodin freebsd_committer 2018-01-27 09:06:38 UTC
Approved by portmgr
Comment 2 Don Lewis freebsd_committer 2018-01-28 04:02:47 UTC
While the x11/altyo patch should produce a working package, the real problem is with the package built by x11-toolkits/vte3 when vala 0.36.9 is used.

This is the diff between the good and bad versions of vte-2.91.vapi:

@@ -150,8 +150,7 @@
 		public Vte.CursorShape cursor_shape { get; set; }
 		[NoAccessorMethod]
 		public Vte.EraseBinding delete_binding { get; set; }
-		[NoAccessorMethod]
-		public string encoding { owned get; set; }
+		public string encoding { get; set; }
 		[NoAccessorMethod]
 		public Pango.FontDescription font_desc { owned get; set; }
 		public double font_scale { get; set; }

This change causes altyo to try to use a setter method to set encoding instead of setting the value directly, and the setter method that it attempts to use has a different number of arguments than the method present in older versions of vte that is still present for backwards compatibility.
Comment 3 Don Lewis freebsd_committer 2018-01-28 20:07:30 UTC
This appears to be a regression in between vala 0.36.7 and 0.36.8.
Comment 4 Don Lewis freebsd_committer 2018-01-29 01:23:50 UTC
I've filed this bug upstream:
  https://bugzilla.gnome.org/show_bug.cgi?id=792998

I will downgrade vala to 0.36.7 once I have completed my testing.
Comment 5 commit-hook freebsd_committer 2018-01-29 03:09:11 UTC
A commit references this bug:

Author: truckman
Date: Mon Jan 29 03:08:17 UTC 2018
New revision: 460236
URL: https://svnweb.freebsd.org/changeset/ports/460236

Log:
  Downgrade vala from 0.36.9 to 0.36.7 and bump PORTEPOCH.  Vala versions
  0.36.8 and 0.36.9 incorrectly generate vte-2.91.vapi when building
  x11-toolkits/vte3, which breaks the build of x11/altyo.

  PR:		225476
  Reported by:	antoine (portmgr)

Changes:
  head/lang/vala/Makefile
  head/lang/vala/distinfo
Comment 6 commit-hook freebsd_committer 2018-01-31 21:59:35 UTC
A commit references this bug:

Author: truckman
Date: Wed Jan 31 21:59:20 UTC 2018
New revision: 460545
URL: https://svnweb.freebsd.org/changeset/ports/460545

Log:
  Upgrade vala from 0.36.7 to 0.36.10, which fixes the bug in versions
  0.36.8 and 0.36.9 that broke the x11/altyo build as reported in PR 225476.

   * Various bug fixes:
    - girparser:
      + Set NoAccessorMethod for non-readable and construct-only properties
      + Ignore conflicting closure/destroy indexes
      + Don't accept methods as property-accessor which throw errors
        [#792998]
    - codegen:
      + Infer error parameter from abstract/virtual base methods [#614294]
      + Fix return-type for cancelled async creation methods of classes
        [#792942]
    - vala: Variadic constructors without a real first parameter are not
            allowed

  PR:		225476

Changes:
  head/lang/vala/Makefile
  head/lang/vala/distinfo