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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 17 10:51:44 PST 2014


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

           Summary: [GTK] WebKit2WebExtension GIR can't be used in vala
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: marcel.tiede at yahoo.de
                CC: cgarcia at igalia.com


In Bug https://bugs.webkit.org/show_bug.cgi?id=122407 the GIR-File of WebkitGTK was split into two separate files: WebKit2-3.0.gir and WebKit2WebExtension-3.0.gir.

Compiling the following minimal vala program fails, because it can't read the symbols from the WebKit2WebExtension-3.0.gir:

---
public void Test() {
   WebKit.WebPage p;
}
---

If instead of a WebPage variable a WebView variable ("WebKit.WebView v;") is used in the code, the example compiles fine. The WebView symbol is located in the WebKit2-3.0.gir and the WebPage symbol is located in the WebKit2WebExtension-3.0.gir.

To compile the example as a library I used the following command:

---
valac --pkg WebKit2-3.0 --pkg WebKit2WebExtension-3.0 --pkg gtk+-3.0 --library=MyWebExtension MyWebExtension.vala -X -fPIC -X -shared -o myWebextension.so
---

If the WebKit2-3.0 and WebKit2WebExtension-3.0 packages in the compiler call are swapped, even the WebView is not found anymore. On IRC I got the hint, that the vala compiler can't handle multiple GIR files which use the same package. The compiler only interprets the first occurrence of the line "<package name="webkit2gtk-3.0"/>" in the GIR file. It interprets the occurrence in the second file as duplicate and ignores it: Resulting in missing symbols. This would also explain the behavior of missing WebView symbol if the arguments in the compiler call are swapped.

To solve this issue a second pkg-config file for the WebKit2WebExtension is needed. Alternatively both GIR files could be merged again.

-- 
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