Compilation failure with Vala 0.22.1: "Invalid assignment from owned expression to unowned variable"

Bug #1252491 reported by nwt
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Files
Fix Released
High
Rico Tzschichholz

Bug Description

Log of the compilation: http://paste.ubuntu.com/6439796/

Among a myriad of warnings, the two errors that cause the failure:

pantheon-files/src/ProgressUIHandler.vala:67.30-67.70: error: Invalid assignment from owned expression to unowned variable
        unowned List<string> cappabilities = Notify.get_server_caps ();
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pantheon-files/src/ProgressUIHandler.vala:69.16-69.28: error: The name `cappabilities' does not exist in the context of `Marlin.Progress.UIHandler.server_has_persistence'
        return cappabilities.find ("persistence") != null;
               ^^^^^^^^^^^^^

I use the git versions of dependencies, and bzr of granite, contractor (which compile) and files, on Arch Linux.

Related branches

nwt (nwt)
description: updated
Revision history for this message
Ugur (vt.tty0) wrote :

I can confirm this . I tried compile pantheon-files 15 minutes ago and failed with same error. I am on Arch Linux too.

Vala Version = 0.22.1
GTK3 = 3.10.4-1
Gnome-Shell = 3.10.2.1

Revision history for this message
Igor Zubkov (biow0lf) wrote :

Full rebuild log on current ALT Linux Sisyphus.

Revision history for this message
Igor Zubkov (biow0lf) wrote :

I don't know vala, but maybe this patch will helps.

Revision history for this message
Cody Garver (codygarver) wrote : Re: [Bug 1252491] Re: Compilation failure: "Invalid assignment from owned expression to unowned variable"

Does fixing the typo fix the build?

On Wed, Nov 20, 2013 at 12:23 PM, Igor Zubkov <email address hidden> wrote:

> I don't know vala, but maybe this patch will helps.
>
> ** Patch added: "pantheon-files-0.1.5.1-alt-fix-build.patch"
>
> https://bugs.launchpad.net/pantheon-files/+bug/1252491/+attachment/3913476/+files/pantheon-files-0.1.5.1-alt-fix-build.patch
>
> --
> You received this bug notification because you are subscribed to
> elementary.
> https://bugs.launchpad.net/bugs/1252491
>
> Title:
> Compilation failure: "Invalid assignment from owned expression to
> unowned variable"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pantheon-files/+bug/1252491/+subscriptions
>

--
Cody Garver

Cody Garver (codygarver)
affects: pantheon-files (ALT Linux) → elementaryos
no longer affects: elementaryos
Revision history for this message
nwt (nwt) wrote : Re: Compilation failure: "Invalid assignment from owned expression to unowned variable"

No, but removing the "unowned" as in Igor's patch worked.

Revision history for this message
Julián Unrrein (junrrein) wrote :

This seems an API change on a new version of either Vala or libnotify.

I can compile with Vala 0.22.0 and libnotify 0.7.5.

Unfortunately, removing "unowned" breaks the build using these older dependencies.

RabbitBot (rabbitbot-a)
Changed in pantheon-files:
status: New → Fix Committed
Changed in pantheon-files:
status: Fix Committed → New
Revision history for this message
Julián Unrrein (junrrein) wrote :

I upgraded Vala from 0.22.0 to 0.22.1 and now it fails at the same stage, so that's where the build is breaking. Removing the "unowned" part makes it build again.

I guess the dependency can be upgraded safely without breaking the Luna build if we get a newer Vala version to the elementary PPA at the same time. What do you think, Cody?

Changed in pantheon-files:
status: New → Confirmed
summary: - Compilation failure: "Invalid assignment from owned expression to
- unowned variable"
+ Compilation failure with Vala 0.22.1: "Invalid assignment from owned
+ expression to unowned variable"
Revision history for this message
Cody Garver (codygarver) wrote : Re: [Bug 1252491] Re: Compilation failure: "Invalid assignment from owned expression to unowned variable"

The latest version available to Luna is 0.22.0, so we can either talk to
our vala packager, ricotz, or do an ifdef around the problem. I think we
should ask Rico first but I don't see him online.

On Wed, Nov 27, 2013 at 5:34 PM, Julián Unrrein
<email address hidden>wrote:

> I upgraded Vala from 0.22.0 to 0.22.1 and now it fails at the same
> stage, so that's where the build is breaking. Removing the "unowned"
> part makes it build again.
>
> I guess the dependency can be upgraded safely without breaking the Luna
> build if we get a newer Vala version to the elementary PPA at the same
> time. What do you think, Cody?
>
> ** Changed in: pantheon-files
> Status: New => Confirmed
>
> ** Summary changed:
>
> - Compilation failure: "Invalid assignment from owned expression to
> unowned variable"
> + Compilation failure with Vala 0.22.1: "Invalid assignment from owned
> expression to unowned variable"
>
> --
> You received this bug notification because you are subscribed to
> elementary.
> https://bugs.launchpad.net/bugs/1252491
>
> Title:
> Compilation failure with Vala 0.22.1: "Invalid assignment from owned
> expression to unowned variable"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pantheon-files/+bug/1252491/+subscriptions
>

--
Cody Garver

Revision history for this message
Julián Unrrein (junrrein) wrote :

Vala 0.22.1 is available on the Vala team PPA (https://launchpad.net/~vala-team/+archive/ppa) and yeah, it seems Rico is the guy to ask. I'll fire him an e-mail.

Cody Garver (codygarver)
Changed in pantheon-files:
milestone: none → isis-beta1
importance: Undecided → High
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

First the binding change fixes a memleak.

Bumping the valla version for some minor binding change might not be reasonable, so to preserve backwards compat you can go like the attached patch and provide a custom binding for this one symbol if needed.

Cody Garver (codygarver)
Changed in pantheon-files:
status: Confirmed → In Progress
assignee: nobody → Rico Tzschichholz (ricotz)
Changed in pantheon-files:
status: In Progress → Fix Committed
Cody Garver (codygarver)
Changed in pantheon-files:
milestone: isis-beta1 → 0.1.6
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.