GNU bug report logs

#25425 lua does not set search paths

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #17 received at 25425@debbugs.gnu.org (full text, mbox, reply):

Received: (at 25425) by debbugs.gnu.org; 22 Jan 2017 21:56:42 +0000
From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 16:56:42 2017
Received: from localhost ([127.0.0.1]:38515 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1cVQ7t-00067L-Px
	for submit@debbugs.gnu.org; Sun, 22 Jan 2017 16:56:41 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1cVQ7s-000674-Dp
 for 25425@debbugs.gnu.org; Sun, 22 Jan 2017 16:56:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@gnu.org>) id 1cVQ7k-00008d-96
 for 25425@debbugs.gnu.org; Sun, 22 Jan 2017 16:56:35 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45312)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@gnu.org>)
 id 1cVQ7k-00008W-5k; Sun, 22 Jan 2017 16:56:32 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:37290 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@gnu.org>)
 id 1cVQ7j-0001DE-GM; Sun, 22 Jan 2017 16:56:31 -0500
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Subject: Re: bug#25425: cannot express search path
References: <87shoo7dgx.fsf@mdc-berlin.de> <87r34879o1.fsf@elephly.net>
 <87bmvc2vjn.fsf@gnu.org> <87lgug72vc.fsf@elephly.net>
Date: Sun, 22 Jan 2017 22:56:29 +0100
In-Reply-To: <87lgug72vc.fsf@elephly.net> (Ricardo Wurmus's message of "Thu,
 12 Jan 2017 15:46:15 +0100")
Message-ID: <87d1feep2q.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -8.2 (--------)
X-Debbugs-Envelope-To: 25425
Cc: 25425@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -8.2 (--------)
Hello!

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> I think this should work:
>>
>>        (search-path-specification
>>          (variable "LUA_PATH")
>>          (separator ";")
>>          (files '("share/lua/5.3"))
>>          (file-pattern "\\.lua$")
>>          (file-type 'regular))
>
> I tried this very same thing but it doesn’t work because Lua expects
> placeholders (“?”) in the search paths.  The placeholders are replaced
> with the actual package names.  If the actual file name does not exist
> it will try the next pattern.  If the file *does* exist – which *will* be
> the case for any of the files on LUA_PATH that have been generated by
> the search-path-specification — Lua will try to load the package from
> that path.
>
> This will fail because a search for the “lpeg” module would be satisfied
> by the file “re.lua”, because that’s the first valid file on the
> LUA_PATH.  “re.lua” requires “lpeg” itself, so another lookup is
> performed, which will again result in “re.lua” to be loaded…
>
> AIUI we must generate a value for LUA_PATH that keeps the placeholders
> intact.

So are you saying that it’s important for the question marks to remain
intact?

This sounds terrible.  I’m not sure how to address it, and I don’t feel
like stretching the search path mechanism this much.

Thoughts?

Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Tue Sep 9 17:38:02 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.