Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B7269E47 for ; Thu, 29 Sep 2011 16:40:04 +0000 (UTC) Received: (qmail 90885 invoked by uid 500); 29 Sep 2011 16:40:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 90831 invoked by uid 500); 29 Sep 2011 16:40:03 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 90823 invoked by uid 99); 29 Sep 2011 16:40:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 16:40:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 16:39:56 +0000 Received: by vcbf11 with SMTP id f11so938935vcb.11 for ; Thu, 29 Sep 2011 09:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=1yQ4i7KhxF1azcrhyQwbkOECatNK3LNfC/N5Ey42gOU=; b=tiqpzQ9oLbkT0XkNTjZ0AFOgGMvXrj0lGg7S9Au4kArlbLx/CHOWue6TaDopepNlVF SeJd0yEbLuR2gpPSU3jpV+QjKnwQHxqBGr0J77M7au2TiYGkFIQ2x86dcdQMAoWEmEfy Sejz2VPJ05I5qAf06JbRG0p84FzpUfphqTmX0= Received: by 10.52.90.52 with SMTP id bt20mr11066951vdb.515.1317314376040; Thu, 29 Sep 2011 09:39:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.73.134 with HTTP; Thu, 29 Sep 2011 09:38:56 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Thu, 29 Sep 2011 11:38:56 -0500 Message-ID: Subject: Re: Warning: minor incompatability in the 1.1.x branch with map helper functions To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Try adding a semicolon between them. Although this is quite unfortunate. I'm suddenly wondering if we shouldn't figure out a different fix to the anonymous function evaluation. On Thu, Sep 29, 2011 at 6:23 AM, Matt Goodall wrot= e: > Hi, > > I just tested an app against the latest 1.1.x =A0branch and discovered > something annoying but easily fixable in a view. > > I have a view with something like the following for the map part: > > =A0 =A0function some_helper() { > =A0 =A0 =A0return "blah"; > =A0 =A0} > > =A0 =A0function(doc) { > =A0 =A0 =A0emit(doc._id, some_helper()); > =A0 =A0} > > Note how the some_helper func is defined *outside* the anonymous map > func. This used to work until the "Fix function evaluation by newer > SpiderMonkey's" commit (61f10e7590bd352b367ad426a56587cbef3700b6) on > 27th Sept. > > Now, I'm honestly not sure why I have a helper func outside the actual > map func - it certainly looks a bit weird - so I'm going to move it > inside. However, I'm fairly sure I saw that done somewhere else, so I > thought I'd post a quick warning in case it affects anyone else. > > - Matt >