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 D5076104F0 for ; Tue, 9 Jul 2013 23:12:37 +0000 (UTC) Received: (qmail 73593 invoked by uid 500); 9 Jul 2013 23:12:37 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 73560 invoked by uid 500); 9 Jul 2013 23:12:37 -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 73552 invoked by uid 99); 9 Jul 2013 23:12:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 23:12:37 +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 agrieve@google.com designates 209.85.219.41 as permitted sender) Received: from [209.85.219.41] (HELO mail-oa0-f41.google.com) (209.85.219.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 23:12:31 +0000 Received: by mail-oa0-f41.google.com with SMTP id n10so8879046oag.14 for ; Tue, 09 Jul 2013 16:12:10 -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 :x-google-sender-auth:message-id:subject:to:content-type; bh=891f+UlcAGLSZuxlDOAX1QIgrxny5EckIHOPIU3hJWc=; b=n9DjEsIGJsk8/lj13+tLkBXXqs9Gnqrn8kL7v9hI45A3F/uu4btTsK84N0BZrgJBIq ni21LsRtdbkZssG05qR20X+wTbN7vH+o1hQ3L45lY0cDgcNGjUlqFUK2hukF3l+V6R7L OXd8XHf+YyksKqRRXggCQpkBI6E2QjOWx5U0LVNlOhdAOt6Fgb2Af0ChLaC8yWw+5Aq1 Z/3lYU/x8ZNqTHiIOzW2dVwDILh/J/Xv2stREYShkwnZeQJ/xesUu2ju+xIy9psZVJZX aLBVQEZe8PYYEXZkAKACHTPZbzZZ/ng1doswyqRG7/fAMdzYingDKyrNX+yLp9CgcEfH 0AkQ== 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 :x-google-sender-auth:message-id:subject:to:content-type; bh=891f+UlcAGLSZuxlDOAX1QIgrxny5EckIHOPIU3hJWc=; b=ae9qAOCSHAyzsI7b09u1/9amC0frT4PvQIFioxyV9+zKb8HeseKMzNlMObJFYDEG+p WuMYtCihIetfv793nkDHLm6phYn4F9lWWBwbQePB9BbkjuMjpJan9HSNB1CMo0Sm0yUz g3Mt09IvNvSFq4TptqVICjmKSLyoVP7eymqGo= X-Google-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 :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=891f+UlcAGLSZuxlDOAX1QIgrxny5EckIHOPIU3hJWc=; b=X7oZjvcGX+5PvlwVAemEFF/VP3PmVwFrHSp5u1jyQU3kiCwV1SmGkItCN9ZEHZxkF3 IPYzfjc3vaK9lpGh894XUFQD5usQY8MZJyUBKhLfEhRZYnbNI4MHb77vcFVB11ng5KzQ DBqQrG6gaQs4CNT6reQD0rxv653RdkgodyHVi5bMGh2eKkAOu5AdF1dkcWUooCGUjg/j 5nawm5DJjKXwUQd76vQlxkzKOvZ/G7GPUz2jw5U6e+8ot5mrw3bQNR4/vRfroq50NQuF 8XKm7DuTJa5Gl20YzKeL4OF9MV0TaU2SJCtZ5pVkFs07GABphWKGIy8t4CkfDB7HNn7u 47jg== X-Received: by 10.182.102.234 with SMTP id fr10mr26359392obb.85.1373411530478; Tue, 09 Jul 2013 16:12:10 -0700 (PDT) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.182.176.66 with HTTP; Tue, 9 Jul 2013 16:11:50 -0700 (PDT) In-Reply-To: References: From: Andrew Grieve Date: Tue, 9 Jul 2013 19:11:50 -0400 X-Google-Sender-Auth: JEfUi0HH3sLax2VgrsuThVSqLyo Message-ID: Subject: Re: Android - Removing the .api namespace To: dev Content-Type: multipart/alternative; boundary=089e0129526a67b10804e11c4a0e X-Gm-Message-State: ALoCoQkz6+u8BaHTDaCXqtC5SJBlc+7ST6DNcNSmftV8U5WaZcX5+v8PgmRjPyB2mPxRAHvzy9hnShIofKx3CI5RKKhRVf/swCHZeEghFipUTA6l8kyqQ9dFkRRPLypkMyqd6pliMHOVdJeXPSv6JwZmxj6AUkmCuXpweM6Cy+7FTnNEzAJZwzRt2q7y5zO+d6Ky6AF9SWTT X-Virus-Checked: Checked by ClamAV on apache.org --089e0129526a67b10804e11c4a0e Content-Type: text/plain; charset=ISO-8859-1 :) okay, now let's see if I can convince you Joe. What I've done so far was put classes in o.a.c.api that extend the actual implementations in o.a.c. This is a bit more annoying than I'd like, because for it work properly, most types must continue to refer to the o.a.c.api classes, or else you'll get a type errors when dealing with non-updated code that expects a o.a.c.api class. Using a separate namespace (.api) to indicate which methods are a part of our public API has the huge draw-back of not allowing us to make use of package-private visibility with the classes in the non-.api namespace. This is my main motivation for the change. I think Java devs often assume any symbol that is public is a part of our API, and I think that's pretty reasonable. Going forward, we should make an effort to convert public symbols to package-private symbols. This will break any plugin that is relying on the symbol, but will *not* break any plugins that are not using the symbol. OTOH, a namespace change, as we're doing here, will break all plugins. So... I'd like to do the complete namespace change now so that when we privatize symbols that we don't want to be a part of our public API, it will not break the large majority of plugins. If you're not convinced, please say why :) On Tue, Jul 9, 2013 at 5:33 PM, Joe Bowser wrote: > Actually, on second thought, no, let's keep the compatibility classes > in for now. We may want to keep using this namespace post-3.0. I > think I misunderstood what was being asked. > > On Tue, Jul 9, 2013 at 2:28 PM, Joe Bowser wrote: > > On Mon, Jul 8, 2013 at 12:50 PM, Andrew Grieve > wrote: > >> Want to bring this up again. > >> > >> There was a bit of discussion on the bug: > >> https://issues.apache.org/jira/browse/CB-4038 > >> > >> I've already gone ahead with creating backward-compatiblity classes in > the > >> .api namespace, but I think it would be better to just delete them. > >> > >> Main points in favour: > >> 1. For 3.0, people will need to do some work to their plugins anyways > (add > >> plugin.xml + refactor their JS into modules comes to mind) > >> 2. The change to plugins is trivial. Just replace all occurrences of > >> "import org.apache.cordova.api" with "import org.apache.cordova". > >> > > > > I'm OK with it for now, only because we don't have the time to > > formalize the Android Plugin API. I would have liked to keep the api > > separation but perhaps we can revisit this 3.1 or 3.2. > --089e0129526a67b10804e11c4a0e--