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 4C281105E0 for ; Thu, 6 Feb 2014 16:22:31 +0000 (UTC) Received: (qmail 22055 invoked by uid 500); 6 Feb 2014 16:22:24 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 21928 invoked by uid 500); 6 Feb 2014 16:22:20 -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 21448 invoked by uid 99); 6 Feb 2014 16:22:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 16:22:12 +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 braden@google.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qa0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 16:22:08 +0000 Received: by mail-qa0-f43.google.com with SMTP id o15so3153555qap.30 for ; Thu, 06 Feb 2014 08:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=CajENiiZ+BbOV/OOA+oxl/t5vZTKCOVrLnTdA5sZQMQ=; b=EKPF+VwTRIUiBvg7HtbEukjykOx2ykpvKK8QfM33IS8LbILtrEOy3RuzPy6ZuxuKWv C0X5+1k+RYlJvInS2Resuae2MzM5DMo/RwUzjKlqKH9ePGX/62XbuhO4iehnJiMDn35+ RVzAEUncm8Zvqy/7sqyJuzF2PfNUG+kG1RtN90youlIOSkVkVmNiVnmHV7gc3xp2r8mp R8P6ZIcNTvBD8Ws63PJpvaNS1gHPUf+m7CxUd8107s5zefF9CSCx54whOs40CXL5uewj PA7i1wNugK98xes0yhzSrwkw65518BIg81RzA1A70KzRQpw3GHqp4M0GeXKCkU89OvO8 +R8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=CajENiiZ+BbOV/OOA+oxl/t5vZTKCOVrLnTdA5sZQMQ=; b=hJW7aMHFexKgRSIAhF9en3ORXcixFBu5qIEevumXiDqcQEeKkNHjkoW59BdCC1wU6U HzmDWTqMcycXPAJaFSXvLXyqT4IXwoFJRKoMWLY8g6TedyvNHKiwDR+xFEURwIX1bith W5yp2xwbySmWFgcyibh1kRCiAMIdKCTAKXJZM= 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:date :message-id:subject:from:to:content-type; bh=CajENiiZ+BbOV/OOA+oxl/t5vZTKCOVrLnTdA5sZQMQ=; b=lmpmBT2Dajglcir2FAg/VhFuG/3l5b3qVj9hXfT+pIzYA6sawudWqWETtSyWE7tKZy Lvsv5I4H989x3G7wbIUWCFLlEXlrBi/yqVfVhiylYpUq5l/vsogGIt69EXzbQhBVZp1n qnHKFrhY0pve04EI9x4JTggkqgq/T9XgcB0uTRWJdqlOzndnWiUmjfDxqAb+xxWqDRIY PfbFzyLe760TbMYuu+LR8oDKZRG2coEBDjWaoBSS7PX2ql4WAzXMzrUyosLUwJT19Lss lZUDSZoZEw2n83Y/nSTDyCtJUOFEyNj9j8f9avcUEWjGqZN4Esd9IxXgZCZkKKrecgxf iBeQ== X-Gm-Message-State: ALoCoQkT3z2lCT/jkoumeqmLRoKo2tRFEEMbaGzqPxZGuypQnPnse0c4EBPKmtMVKEXxQZOIOKXtXSP3tgr3ssmVs6fC6ITiwjiYyWf3R/NULHfk2HJcLAwLGP+iDSMvvyyo0NauUnP2ZcN4S6I56PoXpaAiTsXdNLYfzFddKDV3YTWXz9ztACf1euXZDVvlRiGhcmPZQxARmbW3e+KFbW1m1k2O5+sZkQ== MIME-Version: 1.0 X-Received: by 10.140.92.65 with SMTP id a59mr13136685qge.34.1391703707885; Thu, 06 Feb 2014 08:21:47 -0800 (PST) Sender: braden@google.com Received: by 10.140.91.111 with HTTP; Thu, 6 Feb 2014 08:21:47 -0800 (PST) In-Reply-To: <20140206161243.6680725.93948.11350@blackberry.com> References: <20140206161243.6680725.93948.11350@blackberry.com> Date: Thu, 6 Feb 2014 11:21:47 -0500 X-Google-Sender-Auth: p9RdUyhuAelCAVtm4iwbVMAxxRA Message-ID: Subject: Re: Platform update and breaking plug-ins From: Braden Shepherdson To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a113ab29e24449204f1bf45e5 X-Virus-Checked: Checked by ClamAV on apache.org --001a113ab29e24449204f1bf45e5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I continue to feel that the right approach to platform updates is mostly to keep making platforms/ a build artifact, and largely plugins/ too. I feel that the right thing for an app developer to do for updating platforms would be to backup the entire project, empty out platforms/ and plugins/, and add them both back. What I'd really like is for them to `cordova create ...`, copy in config.xml and www/, `cordova platform add ...`, `cordova plugin add --from-config`, and off you go. If there's nothing project-specific in those directories, then they can be replaced as above. Note that `plugin add --from-config` doesn't exist, but I'd like it to, so that you can easily install plugins which are listed in your (top-level) config.xml. Then you can specify version constraints, like >=3D 2.4 && < 3, which will (assuming we semver properly) prevent you from picking up any broken changes until you're ready to do so. Of course I'm speaking normatively about what I'd like to see; the current upgrade situation is quite a bit uglier. Braden On Thu, Feb 6, 2014 at 11:12 AM, Josh Soref wrote: > So, we discovered that a number of plugins are misusing an API in our > platform (exec). We changed the implementation, and this broke the plug-i= ns > which were expecting different but not promised behavior. > > There's a cordova-cli platform update command, which is supposed to updat= e > your platform, but it doesn't seem fair consider whether a platform could > be incompatible with a plug-in. > > I'm considering having platform update have a way to check the installed > plugins and fail if they fit certain criteria. Does anyone have an opinio= n > on this? > > Another approach would be for the platform update command to be able to > automatically update plugins (it should update them first, ideally to a > version compatible with both the old and new platform ; if it plans to > update after the platform and it's interrupted, then you can easily end u= p > with broken plugins). > > There is a before platform update hook available - although it isn't > documented at: > =E2=80=8E > https://github.com/apache/cordova-cli/blob/master/templates/hooks-README.= md > > I will file a bug and patch for this... > I don't think that it would help. It would require a plug-in to know in > advance that it's buggy, which is unlikely. Knowing about bugs is more th= e > job of a registry (plugins.cordova.io?) > > Sent from my BlackBerry 10 smartphone on the Bell network. > > --001a113ab29e24449204f1bf45e5--