Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: autoload with explicit path
- X-seq: zsh-workers 40346
- From: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: PATCH: autoload with explicit path
- Date: Thu, 12 Jan 2017 11:05:56 -0500
- Cc: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <20170112125602.4fa64dc6@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20170112125605eucas1p1b2539afbacec2d28d44c6fd73b0d50af@eucas1p1.samsung.com> <20170112125602.4fa64dc6@pwslap01u.europe.root.pri>
- Sender: ethersoft@xxxxxxxxx
On Thu, Jan 12, 2017 at 7:56 AM, Peter Stephenson <p.stephenson@xxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author