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 9E60C10DDE for ; Wed, 4 Dec 2013 02:16:32 +0000 (UTC) Received: (qmail 7445 invoked by uid 500); 4 Dec 2013 02:16:32 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 7403 invoked by uid 500); 4 Dec 2013 02:16:32 -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 7394 invoked by uid 99); 4 Dec 2013 02:16:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 02:16:32 +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.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pb0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 02:16:28 +0000 Received: by mail-pb0-f45.google.com with SMTP id rp16so22430126pbb.32 for ; Tue, 03 Dec 2013 18:16:08 -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:from:date:message-id :subject:to:content-type; bh=JZbVtCVPpwCCVm1qUYF+rBYy987VQNn9t4V/tffm6HI=; b=hlSJncIiMCCADUV3t4PvpD4eKIn31NESYLUKztKmPhu6X+6zSmfdCHNhfhPI1O4PWG MuGxFiABpageree0gZYgD6wfnmPkqDT6wHGr+pgT4PJOFnPFLWEWaxJM0MqO1PRIxCs+ RI6UDpBF8uKepmLc9dYmbG/0TWJQpqAMMcfsTTgdyDJET0kxWTV7gleLuyfNpgtSsqqq 2a1I4MP9SlQJWdmIfsJfkPJjd5JUFt/ckCpeu/k+r+HIizWtR2TEIoEwbmDMp6NPAQw5 dwrwTpqG/5I5l82WuNb3fEL0BWyVUdrFz7PYdAXqyCZ768toNZX7KZ0i0/S6RmCuFy6g LgTQ== 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:message-id :subject:to:content-type; bh=JZbVtCVPpwCCVm1qUYF+rBYy987VQNn9t4V/tffm6HI=; b=O2VkDLBBnFNcPYJJLnjp5CPRD6tePk9FWPKPIf8OfhAnt+bJP60UupY6i3byTe1r8r Evo0bYGjf4B9wnTcnUKluAdsPA9rq6iDSIHsy+wKI3y/AocqMhFvd92E9saBGwe9YzUD 4t2VAQzBi8cJudXBVXCtqUzy5rBXcpIvBDDRQ= 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:from :date:message-id:subject:to:content-type; bh=JZbVtCVPpwCCVm1qUYF+rBYy987VQNn9t4V/tffm6HI=; b=gQ+tXOkxHCUjzJo0XtbRAX3vckDAbc28FFS/piGl2+FWgXe2+c2XPQGIGEGy4jCmmK upw2bUZFZFCuIzxrKAOaWQd1t53oyb+5pO2321Zhcu9p6fyhjtGp02JwflgBXVoyahmd WQV7eTwchgUv6tpMKQ8/ooSEi5mcy1N4ruz6W1o43AvRquS4kyqBiThE8KLHZI0nCtaA Y5Imdt39r78s6FWY5UfSxQxf3sYsPzaEMxqdPpS4O25volBiPil05Aa0wFO71SuuDyfw MnHTqB633cIiB+UuUI2/ofybBxLfR428+CyWwgySdRJ+bRkYbsAtEHayOxws0kOjGunc fEmQ== X-Gm-Message-State: ALoCoQmLi/lyR/R59d+Cdti2JrzgIRlmeHAc9G2xq3DbpAIP08bWBVVCII6UizU0gYmKS6ewSK0QIwB7UFogrDV619vFA8mLdP+2JyCQlE+PJpMyC/k+h78fV34T/kAWsC0Ruz0q9ecPWjCz+VFihZmx4XVqCBEM0yn+x64931op4VBoU76nd+Eo9sUaQBYfkR+1RAeQVaKtdvf1FrPqLQVsRjruxsJ5iw== X-Received: by 10.68.50.226 with SMTP id f2mr42039519pbo.76.1386123367931; Tue, 03 Dec 2013 18:16:07 -0800 (PST) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.68.136.35 with HTTP; Tue, 3 Dec 2013 18:15:47 -0800 (PST) In-Reply-To: <2266FED4-4870-4832-A00A-401BCEA4A921@devgeeks.org> References: <2266FED4-4870-4832-A00A-401BCEA4A921@devgeeks.org> From: Andrew Grieve Date: Tue, 3 Dec 2013 21:15:47 -0500 X-Google-Sender-Auth: zbw9YRF1jYPDAuy_UngdPiUFnUo Message-ID: Subject: Re: [android] How to remove the automatic default of To: dev Content-Type: multipart/alternative; boundary=bcaec544ef28f6028204ecabfe44 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec544ef28f6028204ecabfe44 Content-Type: text/plain; charset=ISO-8859-1 Michal - I'm not s On Tue, Dec 3, 2013 at 3:13 PM, Tommy-Carlos Williams wrote: > Absolutely agree. > > +1 for * as default, but just as importantly, +1 for never having to hax > inside ./platforms/**/* for this stuff. > > We are already forced to use hooks to enforce ./platforms as a build > artefact. Any progress towards the great goal of being able to safely > .gitignore the platforms make me feel warm and fuzzy. ;) > > > > On 4 Dec 2013, at 7:09 am, Michal Mocny wrote: > > > Tommy, absolutely the default should remain *, as I said. > > > > But I hope we can agree that it should also be possible to override the > > default without requiring hacks. iOS already supports this, so its a > > matter of feature parity. > > > > -Michal > > > > > > On Tue, Dec 3, 2013 at 2:57 PM, Tommy Williams > wrote: > > > >> Please don't go back to when every new dev had to struggle with the > Google > >> group or irc to find out why their ajax requests didn't work. > >> > >> There was a huuuuge discussion at the time that we chose to default to * > >> On 04/12/2013 6:03 am, "Michal Mocny" wrote: > >> > >>> On Tue, Dec 3, 2013 at 1:30 PM, Braden Shepherdson < > braden@chromium.org > >>>> wrote: > >>> > >>>> There are two different files here: one is defaults.xml, which the CLI > >>>> takes as the basis for its platform config.xml. The other is the > >>> config.xml > >>>> that you get after running bin/create. In the CLI world, that second > >> file > >>>> is immediately overwritten by one created from defaults.xml, the > >>> top-level > >>>> app config.xml, etc. > >>>> > >>> > >>> Okay, thats what I thought we were doing, but I cannot find where/how > the > >>> defaults.xml is created in the first place. I see now that it does > exist > >>> in my CLI projects, but seems not to exist inside our platforms nor > CLI, > >>> nor can I find the code that generates it. > >>> > >>> > >>>> > >>>> I support the second point of removing the from > >> the > >>>> CLI's hello world template app; it should be turned into a comment. > >>>> > >>> > >>> Seems this is redundant anyway given that the platforms provide this > as a > >>> default. Regarding leaving it in as a comment: should we embed the > full > >>> spec as a comment? If not, I would just leave a general description > and > >>> link to the spec docs online. > >>> > >>> > >>>> I don't think we should be including by default > >>>> anywhere, unless we really do want to disable the whitelist on that > >>>> platform. And if we do want to disable it, why not in the native code > >>>> instead of allowing everything by default? > >>>> > >>> > >>> I remember about a year ago we had a bunch of talks regarding the > default > >>> whitelist, and decided that almost every developer doesn't want to use > a > >>> whitelist and wants every request to be allowed by default. For those > >> few > >>> devs that want this (false?) sense of security they can learn how to > >>> opt-in, instead of having the same question on the user lists over and > >> over > >>> about how to opt-out. > >>> > >>> Changing the platforms to allow * by default is an interesting idea, > but > >> I > >>> would rather see a solution that doesn't need that change. Plus its a > >> bit > >>> less semantic/declarative aka more magical/surprising. > >>> > >>> > >>>> > >>>> Braden > >>>> > >>>> > >>>> On Tue, Dec 3, 2013 at 8:04 AM, Michal Mocny > >> wrote: > >>>> > >>>>> On ios, the default config.xml file (aka the platform defaults) is > >>>> bundled > >>>>> as part of the ios project template, and the project template is easy > >>> to > >>>>> override using flags to create script / CLI config options. Easy, > >>> great. > >>>>> > >>>>> For android, the default config.xml file is bundled with the platform > >>>>> framework itself and not as part of the project template. I assume > >>> this > >>>> is > >>>>> not easy to fix, otherwise we would have made the change already? > >>>>> > >>>>> Since the tag is additive (i.e. cannot just override it by > >>>>> appending), there is no way to remove that default without reaching > >> in > >>>> and > >>>>> editing cordova-android/framework/res/xml/config.xml file directly > >>>> (either > >>>>> with a custom post-platform-add hook to run sed, or by forking > >>>>> cordova-android to change the default, both shitty options imho). > >>>>> > >>>>> Any suggestions on how to fix this? > >>>>> > >>>>> I was hoping to propose that we move the tag out of all the platform > >>>>> templates and instead add it to the hello-world app template -- but I > >>>> think > >>>>> that won't work well with the platform-scripts workflow since that > >> flow > >>>>> doesn't use an application level config.xml at all right now. > I like your suggestion here actually. - Take out of defaults.xml, and leave it in CLI's config.xml template - Leave in template's config.xml That will mean: - for non-CLI projects, it will be there by default, and users can edit it directly - for CLI projects, it will be there by default due to the app's config.xml, and users can edit that one to remove it. > >>>>> > >>>>> > >>>>> Second, related issue: cordova-cli bundles a default application > >>>> config.xml > >>>>> file, which also includes . I think this is just > >>>>> unnecessary and should be removed. > >>>>> > >>>>> > >>>>> -Michal > >>>>> > >>>>> p.s. as an aside, I thought we were moving the default platform > >>>> config.xml > >>>>> out into a file called "defaults.xml"? It seems only the good folks > >> at > >>>>> blackberry have done that so far.. > >>>>> > >>>> > >>> > >> > > --bcaec544ef28f6028204ecabfe44--