Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87318E53F for ; Tue, 12 Mar 2013 22:05:55 +0000 (UTC) Received: (qmail 58434 invoked by uid 500); 12 Mar 2013 22:05:55 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 58408 invoked by uid 500); 12 Mar 2013 22:05:55 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 58400 invoked by uid 99); 12 Mar 2013 22:05:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 22:05:55 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brian.leroux@gmail.com designates 209.85.223.170 as permitted sender) Received: from [209.85.223.170] (HELO mail-ie0-f170.google.com) (209.85.223.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 22:05:49 +0000 Received: by mail-ie0-f170.google.com with SMTP id c11so527152ieb.29 for ; Tue, 12 Mar 2013 15:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=lQIK0HJIAdbX6F0/KyfIRNbqyUtg2rjYYh0buiLQ+gk=; b=la0C1iWoCm8p/3PvO/G4hM4QXVRK76PhDY7U2UbhMovIQcdRahSI/6DxqE62+YBw0t 351yFf6IkyZkC4mYn9iJyyok3WtGOFTckS+Si+/SzRPFnjWkzL7hCmF68pcuMg7mRvPK L7UjS8tEprJyasK2OMRED3YRA0sPQHs9SaDr0OUsZb1cBw0WI9yPf2NP4G1FuzE7bl8K wiA/XgxINDsnSmiyF2TsLORu1YM2U2Fsa6Yl70urdZbXg2dqt6pW0uiGMKibDZ9ZcO2Y BByHuPCvnv2vYKaOrwA0qWUIFvUepVhDAmkgNWyIv7D0wpGNLtyHcaR9VNjKJlQDmaAE Pg2w== MIME-Version: 1.0 X-Received: by 10.42.201.73 with SMTP id ez9mr13873795icb.29.1363125928970; Tue, 12 Mar 2013 15:05:28 -0700 (PDT) Sender: brian.leroux@gmail.com Received: by 10.50.72.12 with HTTP; Tue, 12 Mar 2013 15:05:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Mar 2013 15:05:28 -0700 X-Google-Sender-Auth: VqZKUrKOPEHRETDo_sNowKQ-b0E Message-ID: Subject: Re: A word about plugins From: Brian LeRoux To: dev@cordova.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Ok cool, ya no blame-game---just wanted to understand the problem so I can internalize the 'why' of your solution! On Tue, Mar 12, 2013 at 2:57 PM, Braden Shepherdson wrote: > I've sent a pull request to plugman earlier today that fixes one case of > this, among other things. > > Here's an example of it in master: > https://github.com/imhotep/plugman/blob/master/platforms/android.js#L202 > This function looks up a tag in the android , but > that might not exist. iOS does something similar. > > There was a similar fix to cordova-cli a couple of months ago, where it was > choking on failing to find any s in the android , > back when I first wrote the refresh plugin. > > I'm not trying to blame developers for introducing problems. My goal here > is to get people to remember, when they're working on these tools, that > there are plugins that lack either native code or Javascript code, and that > don't add tags to config.xml. > > Braden > > > On Tue, Mar 12, 2013 at 5:36 PM, Anis KADRI wrote: > >> Dear Braden, >> >> Indeed, plugman assumes that there are javascript files, config files and >> uses a tag in the config file to check whether a plugin is installed or >> not. This is obviously not an ideal solution for javascript only plugins >> that don't have a plugin tag in the config file. You are right. We need a >> better solution to detect the status of javascript/native only plugins. I >> believe we'll solve this problem when we solve the problem of plugin >> dependencies. >> >> However, as much as I like critiques, I like them better when they're >> constructive and I am not sure who you're referring to when you're saying >> "stop writing code" or "people making this implicit assumption". If >> something doesn't work the way you think it should, I suggest you just open >> an issue and describe your problems/frustrations. If you have solution to >> the problem or a pull request that's even better. >> >> Cheers, >> >> -a >> >> >> On Tue, Mar 12, 2013 at 12:56 PM, Braden Shepherdson > >wrote: >> >> > Well, people keep making this implicit assumption and I have to keep >> fixing >> > it to keep my several JS-only plugins working. >> > >> > The problem with plugman is a higher-level problem. If we want to keep >> > plugman as a separate tool to support building Cordova apps manually, >> then >> > we need a solution to detecting what plugins are installed. I'm not sure >> > what that approach should be. >> > >> > >> > On Tue, Mar 12, 2013 at 3:36 PM, Filip Maj wrote: >> > >> > > So should we file a plugman issue or is this a bigger problem around >> what >> > > committers are doing? I'm confused, it sounds like someone did >> something >> > > wrong? >> > > >> > > On 3/12/13 2:33 PM, "Braden Shepherdson" wrote: >> > > >> > > >This is a problem for adding and removing plugins in plugman. >> > cordova-cli >> > > >can use the existence of directories in plugins/ to know what's >> > installed, >> > > >but plugman can't do that. It currently looks for a tag or >> > > > tag, and assumes they exist, which causes errors. So I >> > check >> > > >whether the tag is defined before trying to read attributes from it. >> > > > >> > > >That avoids the error but doesn't solve the problem of knowing what is >> > and >> > > >isn't installed. Plugman just assumes JS-only plugins are never >> > installed, >> > > >so they can be double installed, and can't be removed. >> > > > >> > > > >> > > >On Tue, Mar 12, 2013 at 3:24 PM, Brian LeRoux wrote: >> > > > >> > > >> Hey Braden, is there a specific place this happened? >> > > >> >> > > >> On Tue, Mar 12, 2013 at 8:45 AM, Braden Shepherdson >> > > >> >> > > >> wrote: >> > > >> > There are JS-only plugins with no native side. Stop writing code >> > that >> > > >> > expects there will always be a or directive >> > in >> > > >> > plugins.xml >> > > >> > >> > > >> > There are native-only plugins with no Javascript, too. >> > > >> > >> > > >> > Braden >> > > >> >> > > >> > > >> > >>