You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Braden Shepherdson (JIRA)" <ji...@apache.org> on 2013/11/06 21:35:17 UTC

[jira] [Resolved] (CB-4912) tags should support modifying attributes

     [ https://issues.apache.org/jira/browse/CB-4912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Braden Shepherdson resolved CB-4912.
------------------------------------

    Resolution: Won't Fix

Closing this as WontFix. I started implementing this today, but there are some serious problems with it.

First, multiple plugins editing the same attributes result in one of them winning arbitrarily and unpredictably.

Second, uninstallation is nearly impossible. If we overwrote an existing attribute value, we have no way to recover it. If we added it when it didn't exist before, we can just remove it, but only if we know that we added it.

We don't have the necessary metadata, but even if we did, we would still run into cases where attribute A is originally set to false, and plugins P and Q both set it to true, and then we remove P. It restores the original value of false even though Q is installed. To solve that we need to make this logic even more complicated, so that we can find other plugins trying to set the same value and make sure their changes are still being applied.

This is not the halting problem, therefore it's not impossible. However, it's a huge amount of pain and potential bugs to solve a rare use case that's pretty easy to ask a user to edit themselves, especially for AndroidManifest.xml.

> <config-file> tags should support modifying attributes
> ------------------------------------------------------
>
>                 Key: CB-4912
>                 URL: https://issues.apache.org/jira/browse/CB-4912
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: Plugman
>            Reporter: Braden Shepherdson
>            Assignee: Braden Shepherdson
>
> config.xml/plugin.xml <config-file> tags should support adding or updating an attribute on a tag, such as the main Android <activity>.



--
This message was sent by Atlassian JIRA
(v6.1#6144)