Deprecation warning compiling against unity.vapi

Bug #1772338 reported by Michael Gratton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libunity (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Vala 0.31.1 deprecated the "Deprecated" code attribute, replacing it with "Version". The copy of unity.vapi shipped by libunity-dev in bionic still uses the Deprecated attribute, however.

I.e. in unity.vapi:

    [Deprecated (replacement = "AppInfoManager.get_default")]
    public static Unity.AppInfoManager get_instance ();

Should instead be:

    [Version (deprecated = true, replacement = "AppInfoManager.get_default")]
    public static Unity.AppInfoManager get_instance ();

This causes a deprecation warning when compiling against it, regardless of whether any deprecated calls are actually being made by the code being compiled. While a minor issue, it would be good to have fixed since it makes it impossible to develop against it with fatal warnings enabled, which is bad for QA.

The Unity build seems to generate that file as per usual (as a valac build artefact) so I would assume this should be fixed by a simple rebuild using vala >= 0.31.1, but surely the version of libunity-dev that shipped with bionic would have been rebuild against valac that ships with bionic (0.40)? So I'm not sure why Deprecated is still present in the vapi.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libunity-dev 7.1.4+18.04.20180209.1-0ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon May 21 10:45:08 2018
InstallationDate: Installed on 2015-07-22 (1033 days ago)
InstallationMedia: Ubuntu-GNOME 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: libunity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michael Gratton (mjog) wrote :
Changed in libunity (Ubuntu):
status: New → Confirmed
Changed in libunity (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Ancell (robert-ancell) wrote :

That tag comes from src/unity-appinfo-manager.vala so a code change is required:
https://code.launchpad.net/~robert-ancell/libunity/update-deprecation-tags/+merge/353363

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.