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 6FC6911E1C for ; Wed, 23 Apr 2014 17:27:10 +0000 (UTC) Received: (qmail 96930 invoked by uid 500); 23 Apr 2014 17:27:09 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 96856 invoked by uid 500); 23 Apr 2014 17:27:09 -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 96846 invoked by uid 99); 23 Apr 2014 17:27:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2014 17:27:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmocny@google.com designates 209.85.220.178 as permitted sender) Received: from [209.85.220.178] (HELO mail-vc0-f178.google.com) (209.85.220.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2014 17:27:05 +0000 Received: by mail-vc0-f178.google.com with SMTP id hu19so1530037vcb.37 for ; Wed, 23 Apr 2014 10:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=MkjZDS5v/5ACklR8lCGpEoGJ7Hbrjr9fj14rippV170=; b=N72dQ8MElsxTwPmYTJvlSF05k3XFx1Ct8Jx5oP1OWnvoGmYOlNoeFYLyGBbfE5ZQ8+ P01xz8YQ+4Z6CM413E54yyXT6RTgvDQJgh975iwb/z6hn+qaDmNyc88imG4941kqC150 /MIyhV8rhqlbdKWM4+v8XKIwDPl8/mTCD2smZlp8tRMNXij7HWhbeb5gr8YVtYopXrf8 V4dcSvcygtaXasjxE1CUWvtjl49BpHiFZnCCPSXS9YFPczZAAr3d336MuzuuQ9uh5X19 WaAR7I6fVZnUEJhc7Di7beCoC5P61vY469nlKJS2Cr91wYB0PnaxFqyBlLln4xTWj1fw qu1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=MkjZDS5v/5ACklR8lCGpEoGJ7Hbrjr9fj14rippV170=; b=kVNc8+VJk9r2RYyskhaSdEMFpTKFdue7FUBeczdd9dPN1JC/meKHjA3zLD9xadBjHW RSP/OVnG9trqKXg92M6GsX1rqKnxl6Uhx7e9qAxLgS+g9rgMWpPHBoCAxiKVoH5qCiwL cdsgE/KWHHSIEdVJKAYrUVJ0oiaVXTW35smeI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=MkjZDS5v/5ACklR8lCGpEoGJ7Hbrjr9fj14rippV170=; b=aWyjF1xaeMZfqErSYsakfTL9ay2lgB/BgseXLn7GO6ttuu8bI/gLBr4R/HXEbwFcrf dwMNs6jZ6zhU+94GEGk/7JeG+Fd/KTutEZPVy4bEz37O02pNLtHc+u4XKG1ZrY49OhZ5 fxQku2CRZgEMkpDgmI6uI9V5bdjwT5EdKUVvWLF3Ai0Sf5MRHjwHEEyt6zWWjRPgfeeR EO3Lfy+Pxsk/K7V9mbIKnn8kdK0QeHKC1OXMz1iprdLuvbsJn4Z9iDLtn3R+O1uc3Qhm 5uxpFU88dhzFOAfXx9pJLb2Fc3Y30D/kMJ8Csdj85I2hqPZZFqEHHCrhD6FmZ8JuPNHB cztA== X-Gm-Message-State: ALoCoQkro00nZhT08RaqAw9aGqey2bGeQHCd4xUMhP3QmjCI0/snJk0drXgCcaPLVSnMT5V29nTccfFY/uscLjVWnkrzFDXIV490Vp1Et0m7BiOP/txcG95QRf1AJnvQvyozdCqo5dwTDyKD2XbnLASu2yG32hzg1uBu3KsNqQWZG7ClsdsPv4JHtcG/dLGyLv3WuswF/6EBOE0kcDKFsPQKGlzb5oTDzw== X-Received: by 10.220.109.138 with SMTP id j10mr758769vcp.54.1398274004004; Wed, 23 Apr 2014 10:26:44 -0700 (PDT) MIME-Version: 1.0 Sender: mmocny@google.com Received: by 10.52.31.101 with HTTP; Wed, 23 Apr 2014 10:26:22 -0700 (PDT) In-Reply-To: <5357e819.aa1f450a.1c68.7e18@mx.google.com> References: <5357431c.6ae7440a.7618.2cb1@mx.google.com> <5357e819.aa1f450a.1c68.7e18@mx.google.com> From: Michal Mocny Date: Wed, 23 Apr 2014 13:26:22 -0400 X-Google-Sender-Auth: -ZeCnkBocmGvb7_4rhP22OCQl2A Message-ID: Subject: Re: Looking for input on syntax to use for specifying plugin deps in config.xml To: dev Content-Type: multipart/alternative; boundary=047d7b3a95784ed06e04f7b909d2 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a95784ed06e04f7b909d2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Gorkem has an initial implementation posted here: https://github.com/apache/cordova-cli/pull/165 -- but its missing a change previously discussed to support explicit "cordova restore" instead of auto-restore-on-prepare. He also made us a video: https://www.youtube.com/watch?v=3Dbc60WAQdOjE The syntax for deps in that patch currently uses tags and looks like this: Whereas plugin.xml tags look like: And the current platform config.xml feature tags look like: (note the caveat Andrew mentions that these are intended to solve a different problem= ) Food for thought. -Michal On Wed, Apr 23, 2014 at 12:19 PM, purplecabbage wr= ote: > Can we see a mock version of what this all would like in either case? > I also withdraw my previous +1 for after Michal's clarificatio= n. > > Sent from my iPhone > > > On Apr 23, 2014, at 9:03 AM, Michal Mocny wrote: > > > > Actually I don't think of platforms as dependencies. Your app doesn't > need > > android to run on iOS. It needs plugins. Plugin deps may be specific to > > certain platforms, but platforms are targets. > > > > So I think dependency is not ambiguous with platforms.. Though your app > may > > have more deps than just Cordova plugins. > >> On 23 Apr 2014 10:08, "Andrew Grieve" wrote: > >> > >> I like the idea! > >> > >> The main thing I don't like about , is that it already means > >> something different in platform config.xml: > >> > >> > >> > >> > >> This means that when JS makes an exec() for "LocalStorage", route it > >> to "CDVLocalStorage". JS-only plugins don't inject , and > >> does not contain plugin IDs. If a plugin has multiple exec() > >> targets, then it *must* inject multiple tags. > >> > >> > >> is much closer, but the meaning is not as clear in > >> config.xml (e.g. apps depend on platforms as well). > >> > >> So, how about using ? Name is quite clear :). > >> > >> > >> > >> > >> On Wed, Apr 23, 2014 at 12:35 AM, purplecabbage < > purplecabbage@gmail.com> > >> wrote: > >>> I think consistency with input and output config.xml files makes more > >> sense than consistency with plugin.xml. So +1 > >>> > >>> Sent from my iPhone > >>> > >>>> On Apr 22, 2014, at 8:06 PM, Gorkem Ercan > >> wrote: > >>>> > >>>>> On Tue, Apr 22, 2014 at 8:44 PM, Andrew Grieve > > >> wrote: > >>>>> > >>>>> Anis - Gorkem wants since it works with his IDE. *Why* do > >>>>> you prefer ? > >>>> Just to be clear I am not trying to push for because it > works > >> on > >>>> the JBoss/Eclipse IDE now. I do not mind ripping it apart and > >> implementing > >>>> a new editor if there is a good benefit. However I favor > >> because > >>>> it allows validation and content assist due to its XSD (I think we > have > >>>> discussed about this earlier) which is probably the only benefit of > the > >> xml > >>>> markup on a configuration file these days. > >>>> > >>>> If we use dependency for defining the plugins to be restored it does > not > >>>> mean that magically disappears. It is still used by the > >> platform > >>>> runtimes and therefore the CLI generated config.xml files. I guess > that > >>>> would mean we still need to keep the documentation etc for it around= . > >>>> > >>>> Also one thing that I have noticed when implementing the restore for > >>>> plugins because all the information is given as s under featu= re > >> it > >>>> is very easily extendible. For instance if someday we want to suppor= t > >>>> enterprise plugin registries, we could just add >>>> value=3D"http://registry.acme.corp" /> and use the value on the > >>>> implementation. Same could be done to dependency by adding another > >>>> attribute which would break the validations etc. > >>>> > >>>> > >>>> > >>>>>> On Tue, Apr 22, 2014 at 6:56 PM, Anis KADRI > >> wrote: > >>>>>> I prefer . > >>>>>> > >>>>>> > >>>>>>> On Tue, Apr 22, 2014 at 11:41 AM, Mark Koudritsky < > kamrik@google.com > >>> > >>>>>> wrote: > >>>>>> > >>>>>>> I prefer the syntax. It's shorter, more intuitive an= d > >>>>>>> consistent with plugin.xml. I don't see much value in _partial_ > >>>>> compliance > >>>>>>> with the w3c spec. > >>>>>>> > >>>>>>> > >>>>>>> On Tue, Apr 22, 2014 at 1:31 PM, Michal Mocny > >>>>> wrote: > >>>>>>> > >>>>>>>> Gorkem is adding awesome feature to restore plugins/platforms yo= ur > >> app > >>>>>>>> depends on. There is some debate on the correct syntax to use i= n > >> the > >>>>>>>> config.xml file: do we use (a) plugin.xml style tag= s, > >> or > >>>>> (b) > >>>>>>>> w3c widget spec tags? > >>>>>>>> > >>>>>>>> Gorkem votes (b), arguing that using widget spec helps his tools > >> with > >>>>>>>> editing config.xml (existing gui editor, I assume?), and has > >>>>> implemented > >>>>>>> a > >>>>>>>> PR for it (https://github.com/apache/cordova-cli/pull/165). > >>>>>>>> > >>>>>>>> I vote (a), arguing that we already don't match widget spec, and > >>>>> already > >>>>>>>> have established syntax for for specifying plugin urls & version= s > in > >>>>>>>> plugin.xml (with docs and examples), and its better for our CLI > >>>>>>>> implementation to use existing plugin deps handlers. > >>>>>>>> > >>>>>>>> What do you think? > >>>>>>>> > >>>>>>>> Background: read full thread titled "[GitHub] cordova-cli pull > >>>>> request: > >>>>>>>> CB-6469" > >> > --047d7b3a95784ed06e04f7b909d2--