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 6DF73DFB2 for ; Wed, 15 May 2013 22:08:07 +0000 (UTC) Received: (qmail 68702 invoked by uid 500); 15 May 2013 22:08:07 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 68675 invoked by uid 500); 15 May 2013 22:08:07 -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 68662 invoked by uid 99); 15 May 2013 22:08:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 22:08:07 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stevengill97@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 22:08:01 +0000 Received: by mail-ob0-f182.google.com with SMTP id va2so2653177obc.13 for ; Wed, 15 May 2013 15:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Q7Shp/joXTjxfEB6y8StUmic68cQfcz4noteLiOTRrQ=; b=Ktd0aMyKVtfoi+Y702p0N4SFE67GfUMauTAkuo1MKZwLt6DzIC+sUa3HCdt3y1P/Hg TbyTeg0Uhtctr82vIy8nQxP6MJ+5mtz0zjdmZQi0ScFZlTgl8fkmxpah5/J0rLhHymBd e3UnonTroGKfXVUQzzsa0ek6LYZq7veP++cJGFeII6BZEojULj2uORSOcdGUumHCuiqR stnIrbYQJX8gplOUcMxIMC4086SosmpH3oLyVqCncUYgUBbjaKl9RyjRO9pJiaEjn9Nc n4apMG/TnBcunNhfmLdlAZsLiQqgeMxWp4i1/QNre2QlD8sIiuyVC6DsP+VjY2lizjqU aBUA== X-Received: by 10.60.147.197 with SMTP id tm5mr20841478oeb.72.1368655660401; Wed, 15 May 2013 15:07:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.153.193 with HTTP; Wed, 15 May 2013 15:07:20 -0700 (PDT) In-Reply-To: References: From: Steven Gill Date: Wed, 15 May 2013 15:07:20 -0700 Message-ID: Subject: Re: plugin loader breakage from blackberry 10 merge into cordova js To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=047d7b41846f754b6704dcc8fa01 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b41846f754b6704dcc8fa01 Content-Type: text/plain; charset=ISO-8859-1 This may be unpopular, but I'm wondering if the best solution might be to drop jsmodule/cordova_plugins.json and go back to just including script tags in plugin.xml that get added to your index.html/cordova.js. I know it isn't as pretty, but it won't have to deal with these issues. On Wed, May 15, 2013 at 12:36 PM, Bryan Higgins wrote: > That won't work for remotely hosted pages and wouldn't allow for the File > API to be pulled out into a plugin. > > Based on the constraints, the only other solution I can think of is to > require that cordova.js sits at the root of the project. The plugin loader > scripts could then figure out the path based on the cordova-js script tag. > The original plan was to inject directly into cordova-js, which would have > imposed a similar constraint, but a decision was made to use a JSON file to > avoid code generation issues. > > Keep in mind that the path is relative to the HTML file, not the script > making the XHR. > > > On Wed, May 15, 2013 at 3:12 PM, Filip Maj wrote: > > > Could we leverage our own File API to load the plugins json instead of > > relying on (possibly unclear local vs remote) XHR semantics? > > > > On 5/15/13 12:03 PM, "Steven Gill" wrote: > > > > >Hey All, > > > > > >If you haven't checked out issue CB-3393[1], you should. I believe this > is > > >a pretty big problem and brings into question the way we are loading > > >plugins. > > > > > >Using an absolute path is not going to work as Braden suggests in the > > >comments of the issue. He proposes adding code to cordova.js that will > > >search for the cordova_plugins.json file and reference it correctly. > This > > >feels very hacky to me and will lead to more issues. I believe we need > to > > >reconsider how we are loading plugins. > > > > > >I am hoping more people decide to chime in on this discussion. > > > > > >[1] - https://issues.apache.org/jira/browse/CB-3393 > > > > > > > > >On Wed, May 15, 2013 at 9:12 AM, Steven Gill > > >wrote: > > > > > >> Hey Bryan, > > >> > > >> Thanks for chiming in. I realized this after I made the change > > >>yesterday. > > >> Tracking it with https://issues.apache.org/jira/browse/CB-3393 > > >> > > >> Cheers, > > >> -Steve > > >> On May 15, 2013 5:34 AM, "Bryan Higgins" > > >>wrote: > > >> > > >>> Thanks Steve. I meant to bring that commit up on the list. > > >>> > > >>> The problem is that the relative reference to cordova_plugins.json > only > > >>> works when the page is in the same directory as that file. Is that > > >>>also an > > >>> issue on ios/android? If so, is there a standard cross platform way > to > > >>> reference a file in the root of a cordova app? > > >>> > > >>> We had to do something similar in plugman. This has not yet been > merged > > >>> in: > > >>> > > >>> > > >>> > > >>> > > https://github.com/blackberry/cordova-plugman/commit/7f8b704b6d4eb7419ca > > >>>a56faee743f841bc987bd > > >>> > > >>> > > >>> On Tue, May 14, 2013 at 8:03 PM, Steven Gill > > > >>> wrote: > > >>> > > >>> > Hey All, > > >>> > > > >>> > The BB10 stuff got merged into cordova.js. The following commit > > >>>breaks > > >>> > plugin_loader for ios + android. > > >>> > > > >>> > > > >>> > > >>> > > https://github.com/apache/cordova-js/commit/8d59461c6f796f2c88a0eae2467c > > >>>c663897ccce9 > > >>> > . > > >>> > I am going to remove the slash for now. > > >>> > > > >>> > -Steve > > >>> > > > >>> > > >> > > > > > --047d7b41846f754b6704dcc8fa01--