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 4EBF8102A1 for ; Tue, 24 Sep 2013 18:59:22 +0000 (UTC) Received: (qmail 26870 invoked by uid 500); 24 Sep 2013 18:59:22 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 26839 invoked by uid 500); 24 Sep 2013 18:59:21 -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 26831 invoked by uid 99); 24 Sep 2013 18:59:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 18:59:21 +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 (nike.apache.org: domain of braden@google.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bk0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 18:59:14 +0000 Received: by mail-bk0-f44.google.com with SMTP id mz10so1890654bkb.31 for ; Tue, 24 Sep 2013 11:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=d5ZKhyXwAbDno1BBeJWwQiZgtAR8AqUSCmEwpC5ef0Q=; b=L8IqYFnlRcpkWNXirx4//b1m0ve5+l+4WrVku9CWJTyVT6Bh6ple59OVqXQB4JiEgj 5nWU26sLmI2ItvstSNRBsOJC0Ke1qZpDbNIdt/j00UlLSQItXp75e6FRENh+uByqtEBJ FQhFArMdWf4p2Bhjz1D3G9wIB8stlUf2z5kJg68pZpX8vO0i1gozNky3KW6k9sbi/riL vx8scFw0hlUTtuS1sjeBMq8U8P8oAshe44qBc6Z+JNjv0Naow4etCCUzwA72W5Gz4FmY o3DIQoUL9ceB9XL1QtQ1tTG0q1sv7gSMCdw8V0FpCj+QYuZkZjnxmWJdMGSXIS+jAEl3 V8WQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=d5ZKhyXwAbDno1BBeJWwQiZgtAR8AqUSCmEwpC5ef0Q=; b=dlaNB8MUceJ/rbZqWuaYhq6hhwplpIG0/5H52FBIOjuoQxqL35w44oxLFRIjaFLtl8 Bo6Qh/xjmffcKP01Ukidh3tXSCCM2tGcpCsyYmlyg/wUR5aIe6Y9ku2l0Z2fkse9dw3b O5D4xlFpmJjl1LIb0ThuzvmvaZf1CirUugg8Y= 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:date:message-id:subject:from :to:content-type; bh=d5ZKhyXwAbDno1BBeJWwQiZgtAR8AqUSCmEwpC5ef0Q=; b=gG9Lwbdmy97yGNprUao89Rc8tKsH4760O8dy52ZaKzXEOjd5g5uvQ6eUsJvI6eWsja AT0z7p9DbCUOoF1P1K2QZISge9oXSZu1KP+JH7eb1l+qunAZExJ5wyvZpmb5JKA9XeVJ ITxx8xn/BrXiKkM4KYzjLO2dROA04quOnS/PQsmR0AJN5YQ0JEy4RWlm4pT0F/g7twwl seMJwJS+Wqc+AzixOVUVUYl5TftWg9BhCfz+7SXABupHsmDVvEeIdk90IlIhl2Iutg8x p3GB0cSBH7NmdhIMLNMgedDfC6l6CFhvuXauoa/Jl2pimpfVjXRBYFvAcfnrJGx8uB3L lucQ== X-Gm-Message-State: ALoCoQn1IKMJbkpmJH5qmd217LdCXBcC+cTPi0b1oxISbrDU9PGtaRa49tdw7+9vypa4oc+/wjCJVWGy5ST6fzRy67cSt3pwtvkTbaLMl1//pTUYyhRssV/VbaE5vMNQotVd6gR20rd7m+XFcFz67rPT/CK90DAYZNW+WREya+avgNILo4mOpiJOnIzIyQI1E1K7pxyzRD9h5jTzkLWHQ3s+LhG6GM32/Q== MIME-Version: 1.0 X-Received: by 10.204.123.199 with SMTP id q7mr24742449bkr.10.1380049133743; Tue, 24 Sep 2013 11:58:53 -0700 (PDT) Sender: braden@google.com Received: by 10.204.243.66 with HTTP; Tue, 24 Sep 2013 11:58:53 -0700 (PDT) Date: Tue, 24 Sep 2013 14:58:53 -0400 X-Google-Sender-Auth: TFCgnH1A6wBBVOWPNfilslZFiO8 Message-ID: Subject: Updating plugin code on prepare From: Braden Shepherdson To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a11334a3c63ee2d04e725bac5 X-Virus-Checked: Checked by ClamAV on apache.org --001a11334a3c63ee2d04e725bac5 Content-Type: text/plain; charset=ISO-8859-1 Michal and I were discussing how to make the plugin developer experience better, by having `cordova prepare` update the platform projects properly when you change a plugin in place. I propose the following changes: 1. On plugin install, we cache the plugin.xml in $PROJECT/.cordova somewhere. 2. On 'cordova prepare', compare each plugin's plugin.xml against the cached one. a. If they have changed, uninstall the plugin using the old plugin.xml, then reinstall using the new one (and update the cached plugin.xml). b. If they are identical, copy all the native code files from the plugin into the project again. The idea is that you can change your plugin's native code, JS modules, or assets, and after a prepare you'll be running the latest. We already have cordova plugin add foo --link, but it wasn't very useful. This will make plugin development a much smoother flow, without too much implementation effort. Checking for changes to plugin.xml lets us know that no files have been added or removed, that edits haven't changed, and so on, meaning that simply copying the native code again will be sufficient. What do people think? Any gotchas that I overlooked? Braden --001a11334a3c63ee2d04e725bac5--