GNOME Bugzilla – Bug 773177
Huge warning spam from libsoup-2.4.vapi
Last modified: 2017-01-02 13:14:30 UTC
With git master of vala and libsoup, I have a horrible warning spam coming from libsoup-2.4.vapi that I don't know how to fix: libsoup-2.4.vapi:1146.3-1146.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1260.3-1260.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1931.3-1931.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1934.3-1934.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1937.3-1937.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1940.3-1940.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1943.3-1943.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1946.3-1946.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1949.3-1949.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1952.3-1952.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1955.3-1955.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:1958.3-1958.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2000.3-2000.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2003.3-2003.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2006.3-2006.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2076.3-2076.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2080.3-2080.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2083.3-2083.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2086.3-2086.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2089.3-2089.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2092.3-2092.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2095.3-2095.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2098.3-2098.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2101.3-2101.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2104.3-2104.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2107.3-2107.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")] libsoup-2.4.vapi:2111.3-2111.12: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
Which are your environment? Please describe. This will help me to reproduce it.
JHBuild. You should be able to reproduce the warnings with 'jhbuild build libhttpseverywhere', though I bet they'll appear for any Vala module using libsoup.
The warning message is pretty clear ;) You need to replace the [Deprecated] annotations in the libsoup source. I guess in Soup-2.4-custom.vala For example: https://git.gnome.org/browse/libgee/commit/?id=1c965b621f2a5ad0769e14b4ba95d22fd555e6ab https://git.gnome.org/browse/vala/diff/vapi/metadata/Soup-2.4-custom.vala?h=wip/gtk4&id=1e7675a11f2e27e8144d6d312ba1f993b7fad94d
Created attachment 337990 [details] [review] vala: replace [Deprecated] annotations with [Version] To be clear, this isn't coming from the vapi distributed with Vala, it's coming from the one distributed with libsoup (which takes priority). The one distributed with Vala moved to the new syntax with ac33d2d5c6fc5cf6ff74852580dc8819478fc4e4 (on 2016-01-30). The attached patch (against libsoup) should fix the issue; please test.
Why does vala distribute the vapi if it's also distributed by libsoup? (Or vice-versa.)
The patch works for me, thanks.
(In reply to Michael Catanzaro from comment #5) > Why does vala distribute the vapi if it's also distributed by libsoup? (Or > vice-versa.) The one distributed with Vala came first, but that's problematic because it's tied to a particular version of valac instead of libsoup. For example, if you want to use a new feature which is only available in the latest libsoup, you have to have to update Vala (and possibly file a bug to get Vala to update the bindings). It's also quite possible that the VAPI distributed with valac will be *ahead* of the version of libsoup you have installed, in which case you're quite likely to end up with errors from the C compiler about missing symbols. For these reasons (and others; see https://wiki.gnome.org/Projects/Vala/UpstreamGuide#Why_Distribute_Bindings_Upstream), it's preferable for libraries to distribute their own Vala bindings. We've kept the bindings for libsoup (and a few other libraries in a similar situation) in valac for backwards compatibility, but we don't really do much maintenance on them. It's probably okay to go ahead and remove them now since it has been several years and libsoup's version should be available everywhere. If you want, feel free to file a bug about that against Vala; I'd be willing to remove them if nobody has any real problems with the idea.
OK, bug #773197.
IMHO you should not feel obligated to carry the vala-specific deprecations around anymore. aka those 'since = "vala-0.XX"'
Attachment 337990 [details] pushed as d00507d - vala: replace [Deprecated] annotations with [Version]
*** Bug 772508 has been marked as a duplicate of this bug. ***
*** Bug 775583 has been marked as a duplicate of this bug. ***