[Webkit-unassigned] [Bug 127179] [GTK] WebKit2WebExtension GIR can't be used in vala

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 10 10:58:16 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=127179


Evan Nemerson <evan at coeus-group.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evan at coeus-group.com




--- Comment #1 from Evan Nemerson <evan at coeus-group.com>  2014-02-10 10:55:33 PST ---
Just to make the issue a bit clearer:

Vala bindings, unlike G-I, are based on pkg-config packages—there is a 1:1 relationship between a bindings and a pkg-config files, and the name of the VAPI is the same as the pkg-config name.  This allows us to pull in the relevant libs and cflags when people pass --pkg WebKit2-3.0 to valac.

G-I, on the other hand, just dumps the path to the shared object into the GIR.  This is sufficient for them because all they do is dlopen (well, g_module_open) that file—they don't have to worry about additional flags for the CC or linker.

Mostly for us, G-I added the ability to specify the exported pkg-config name in a GIR.  When valac sees a GIR, the first thing it does is look at that pkg-config name to see if it has already parsed a VAPI or GIR for with that name to make sure we haven't already loaded bindings for that library.  If we haven't, we parse the remainder of the GIR.  So, when two GIRs share the same pkg-config name, we parse the first GIR, then see that the name is already taken and skip the second one.

The solutions Marcel mentions are correct.  Either pkg-config files (I guess you would need one each for -2.0 and -3.0) for WekKit2WebExtension, or merge the GIRs.  Personally, I think creating an artificial split in the GIR where none exists at the lower levels is a bit nonsensical, but assuming the backwards-compatibility break from the split isn't an issue for you it doesn't really matter from Vala's perspective which you choose since we didn't ship any bindings from before the split.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list