From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29439 invoked by alias); 13 Jan 2017 03:27:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40346 Received: (qmail 3114 invoked from network); 13 Jan 2017 03:27:21 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.214.45):SA:0(0.4/5.0):. Processed in 1.362603 secs); 13 Jan 2017 03:27:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DATE_IN_PAST_06_12, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: ethersoft@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.214.45 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=IYDBHXdIK3enrpokwMeHfD3u8in1B0g78l8xoX5u9Eo=; b=ZejUHTeLCnW1IAXm5O90MNu96s+7/pNE9AXt3J0af5PLG+FtArhCmPKuiYNq6wn8B3 CLQkQG+15mJgVBawf2HaJ7Rg1GOw2JVIm8zGAjdcfHy8KwVoPmcOn7WfcWv7nqFDHhLw GmA1s7oUgTg9IPeNt5mxaLHnvRdGTRE/ayP3ezowAdJTqYHVl2hMPbyKFUlusC4blKno /ZfstA1Klnc1u/4Y1dO4PIxMdX7cnbWl54Y234tauwpY7iRO5EB/s/NINpac9MszviL7 dqj2e8m+yRU7MriKTJ5LryOeSqq9tR18YcRZhbTbpqK7bBMUtiM58Rjeg2Ty5i0QZoI2 VTxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=IYDBHXdIK3enrpokwMeHfD3u8in1B0g78l8xoX5u9Eo=; b=ckq90n4yoOtn9aK3Ik+zdfW8avcQOpYiwN8720lpSoQbnqI+N7l3g4xt7nKpICfOUQ JC26r5r5gEaMD67Pv/XxmQYaqkzZu54eUOKRaDEigaG3XlLY9nNQjB/qfaURMssdVkjx WVPWaVBzeq55lG2YvPyk/keekGsMp4xuw9z/j2Y3bCIHKc8Wz6y1rPnkg7BC518MxOsr q+x4BLgcHGAjxs5avR7mc26fTK2Qp64mMLluuLr87rCVeLcy0HVk/TRrPL7+WZiXeiCi N51Q2kc7b2ON5JdN6iUwbmtxsTUPK87zgjDGI9Wifcm5cseSxqTRvBpINKFhR0V5G4Hp f6ZQ== X-Gm-Message-State: AIkVDXKW5IZAkJlhuth3ULRnsOpyK/l509JocYzVjH//l3kUXQCLnhUpqEgmuP23T+ryEtSfD0v89sNrMZVcpg== X-Received: by 10.36.103.9 with SMTP id u9mr10187402itc.91.1484237157104; Thu, 12 Jan 2017 08:05:57 -0800 (PST) MIME-Version: 1.0 Sender: ethersoft@gmail.com In-Reply-To: <20170112125602.4fa64dc6@pwslap01u.europe.root.pri> References: <20170112125602.4fa64dc6@pwslap01u.europe.root.pri> From: Vin Shelton Date: Thu, 12 Jan 2017 11:05:56 -0500 X-Google-Sender-Auth: pEoWD5cT0jtkNn_ZRA1dhFUEkn8 Message-ID: Subject: Re: PATCH: autoload with explicit path To: Peter Stephenson Cc: "Zsh Hackers' List" Content-Type: multipart/alternative; boundary=001a114ac8fe8300ea0545e7e456 --001a114ac8fe8300ea0545e7e456 Content-Type: text/plain; charset=UTF-8 On Thu, Jan 12, 2017 at 7:56 AM, Peter Stephenson wrote: > I can't reproduce this using the normal tests, but I have found a > possible cause and added a test that does fail in the same way. This > patch fixes that failure. > > The problem is the overloading of filename in struct shfunc. If the > function was alrady loaded, which is the case if it contains an > explicit autoload -X (rather than one generated internally by looking > at the flags for an undefined function), then the filename indicates the > location of the source for the function. If this came from a file with > an absolute path, and there was no explicit directory path in the > autoload -X statement, the file path was erroneously taken as a > directory for loading. > > This adds an explicit flag to indicate filename is being used for that > purpose, unsetting it when the filename is set to the file's path. > > Also be a bit more careful checking if a function wasn't let loaded when > using the new functions options. If it's already loaded they're > irrelevant. > That has fixed the failures for me: I'm now seeing 48 successful tests. Thanks, Vin --001a114ac8fe8300ea0545e7e456--