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 759F4F7A6 for ; Mon, 15 Apr 2013 17:01:50 +0000 (UTC) Received: (qmail 75482 invoked by uid 500); 15 Apr 2013 17:01:50 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 75448 invoked by uid 500); 15 Apr 2013 17:01:50 -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 75438 invoked by uid 99); 15 Apr 2013 17:01:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Apr 2013 17:01:50 +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 agrieve@google.com designates 209.85.219.42 as permitted sender) Received: from [209.85.219.42] (HELO mail-oa0-f42.google.com) (209.85.219.42) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Apr 2013 17:01:46 +0000 Received: by mail-oa0-f42.google.com with SMTP id i18so4668049oag.15 for ; Mon, 15 Apr 2013 10:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=mfnlFXPT2Ym6Mn5DTy719qK6H0wI5ewK4tDAIcw724k=; b=NBxfpzen8cic8FHThDBTsQa09HUeTBddizXBs8FcvQu5msRshTmYaozDuieEfLiUkR wKuVPnX09MbmQg/QY2usNRvcQ5d2POlrgCxR6XEAPE6X41txNrXIu9Ia1poUbLNDGgwD hARK6AKRjzvNSjDvo+6PGFUrHaT5R6NGv4yDnO3kT0vZWz11fkuWXqUOamIhMD62jHF+ +kdkfA7fTmkPXS7/xRkBeK6VttfijoGtTB7q2KDjpPe8Pmqp3576UojfTg4r7QhXPb3p JDFOWV5oKzMvRS4LruNc3sRK7ibKymI/b+YIxvvlxp3gPbimIL3sLmwHHH2ZIrrELaRj 7nPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=mfnlFXPT2Ym6Mn5DTy719qK6H0wI5ewK4tDAIcw724k=; b=ctaz2GzepASOK6qJkPgXxbWoeiIxP7cptVSyDOkfkQHe5gh0wr6mKEczl8lpHafD9K 79GCshF5Y8Hf4v6ZZuqVlESHyVh1Xu+XZL70UEinZioZumD4N2oZg+oyY2jWYq/bq7al x2eVdSW6qq7/iPfhlD82VcFa6rwMBiDZmokkg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=mfnlFXPT2Ym6Mn5DTy719qK6H0wI5ewK4tDAIcw724k=; b=E2YciApWztFRVM5vGsbvaJosEM9drP44rGM5Od3xbrkAlb3k5ZvIZzztR+Pv/TImiR CD5b5kkhIdA0rJuvxkZkhu3OPlB9RGjoK/qtffEkPxYn+gT/haFQo9Q2RXh3qzIEUjuB 4XP8iyuqYNgGVJMBOb6AjEbSorvtupJR/B6uTOTJ/y8oNuF9OLmPPJINsB/Xtjq3wC5t 9iK+Z+a1viK6AWpifpyBS2B2IomVv+ryzAEgKPEC1nmAh0lwmY5YtW2v53NSOlh4XVYy j6I1DZzD/Vrc44tfRJef5c77aQ6Im/cZPoBeW8/UJf1faJl4XieL74Kg/P1UutfxMhZn 2kBw== X-Received: by 10.60.135.131 with SMTP id ps3mr7512404oeb.131.1366045285341; Mon, 15 Apr 2013 10:01:25 -0700 (PDT) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.182.18.36 with HTTP; Mon, 15 Apr 2013 10:01:05 -0700 (PDT) In-Reply-To: References: <20130409180743.5365906.64734.639@blackberry.com> From: Andrew Grieve Date: Mon, 15 Apr 2013 13:01:05 -0400 X-Google-Sender-Auth: Q_zEWWkSc_RfETbxr5qdi7cI5Ew Message-ID: Subject: Re: Module IDs and relative requiring To: dev Content-Type: multipart/alternative; boundary=047d7b33cde8faf62404da69338d X-Gm-Message-State: ALoCoQnlxj1u/miGuSGdCMqsTLjtdHJMbT1iS9uDJB/r09mRAff8zcmFb69xyDAjtlPBlZJxryLjXhnXn11yrX3IQ5/qP/GXWt6FaQ7BNVKumUbFztL0VhNRdbuBVhYzyqYIvtYg010aQAxzrkfpl1BJA3/UuZEk3rZA6MzGMwLgmttfLqV8j5YFPMaxmHlWyO5q8tuV6Buv X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33cde8faf62404da69338d Content-Type: text/plain; charset=ISO-8859-1 Like it! On Tue, Apr 9, 2013 at 2:12 PM, Braden Shepherdson wrote: > Sounds good to me. > > The lack of dots in the js-module name is a new restriction you'll have to > write code to defend against, but I would be surprised to see any existing > plugins violate it. > > Braden > > > On Tue, Apr 9, 2013 at 2:07 PM, Jeffrey Heifetz >wrote: > > > I know at some point we spoke about modifying require to allow relative > > paths within a module and I'm wondering if this is still something we're > > interested in doing and if so what a reasonable spec for doing so would > be. > > > > In the current plugin spec [1], under the JS module tag, we define a > > module's id as the plugin's id, mixed with the module name (provided in > > xml) joined by a ".". Thus a plugin "com.blackberry.foo" with a module > > named "bar" becomes "com.blackberry.foo.bar". > > > > This presents an odd technical problem by using the "." character as a > > path separator but not reserving it from general use (and even > encouraging > > its use elsewhere like in the plugin id). The problem is further > compounded > > by not preventing names from having "."s within them. I believe the > > simplest solution is to not allow "." characters within the js-module > name, > > guaranteeing that the dot separates the module name and the plugin id. > > > > The second issue arises with the desired notation for a relative path > > require. In other systems, since the "/" is used as a separator, relative > > requires are usually prefixed by "./". However since we are not using "/" > > characters as separators does this make sense? My personal feeling is yes > > since this is what our users will be used to. This means that within > module > > "com.blackberry.foo.bar" require("./baz") will result in requiring the > > module "com.blackberry.foo.baz". > > > > If this makes sense to everyone, it greatly simplifies the problem since > > we will not have multiple levels and we'll never deal with ".." > problems. I > > have a patch for this implementation here [2] > > > > > > 1. https://github.com/apache/cordova-plugman/blob/future/README.md > > 2. https://github.com/blackberry/cordova-js/pull/17.patch > > > > --------------------------------------------------------------------- > > This transmission (including any attachments) may contain confidential > > information, privileged material (including material protected by the > > solicitor-client or other applicable privileges), or constitute > non-public > > information. Any use of this information by anyone other than the > intended > > recipient is prohibited. If you have received this transmission in error, > > please immediately reply to the sender and delete this information from > > your system. Use, dissemination, distribution, or reproduction of this > > transmission by unintended recipients is not authorized and may be > unlawful. > > > --047d7b33cde8faf62404da69338d--