From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4MLhBxu+W2BwDwEAgWs5BA (envelope-from ) for ; Wed, 24 Mar 2021 23:32:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aFGnAxu+W2DeWgAA1q6Kng (envelope-from ) for ; Wed, 24 Mar 2021 22:32:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7700015E7F for ; Wed, 24 Mar 2021 23:32:58 +0100 (CET) Received: from localhost ([::1]:57174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPC3d-0005Qd-96 for larch@yhetil.org; Wed, 24 Mar 2021 18:32:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPC2j-0005Nh-Vf for bug-guix@gnu.org; Wed, 24 Mar 2021 18:32:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPC2j-00086N-LZ for bug-guix@gnu.org; Wed, 24 Mar 2021 18:32:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lPC2j-0000tt-Hu for bug-guix@gnu.org; Wed, 24 Mar 2021 18:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#25425: cannot express search path Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 Mar 2021 22:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25425 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Received: via spool by 25425-submit@debbugs.gnu.org id=B25425.16166250903416 (code B ref 25425); Wed, 24 Mar 2021 22:32:01 +0000 Received: (at 25425) by debbugs.gnu.org; 24 Mar 2021 22:31:30 +0000 Received: from localhost ([127.0.0.1]:36338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPC2E-0000t2-9g for submit@debbugs.gnu.org; Wed, 24 Mar 2021 18:31:30 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:41844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPC2C-0000so-Tz for 25425@debbugs.gnu.org; Wed, 24 Mar 2021 18:31:29 -0400 Received: by mail-wr1-f51.google.com with SMTP id b9so346865wrt.8 for <25425@debbugs.gnu.org>; Wed, 24 Mar 2021 15:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=FHinleyZxpftRyTFcG97+4GF7F7g5DR31ciwnCcLL1M=; b=gUCUleCD2krW/msMPdAcOp9n9tN9mA6t07y7KmZhCMCywFNHOmiH0mOauV+96jQCs1 tSve4+bFalMCN5f72z82uyrcH4ZUJ+IDvgFKCfpNAcoOa5BupsstowKr2oisJ2ffQzDQ Y2iEdbWpDQjqUB0i7wfRZZle3MkZysyODYM32f/pRkS1um6xJFY1PASaW6c26EnqhRSd qBkRjlvPOqaB5D+3a5/YeK75VqahTqV5qIaMlOISZ3sVoMoL32WhB1Sy2iim/xG9RV2p 8wgO+VW9bKB+TII6qcTGTEYwlmBft5huNhyTjDDc3DlXyo6Del41d1AcuW39xKfjs03b KSag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=FHinleyZxpftRyTFcG97+4GF7F7g5DR31ciwnCcLL1M=; b=CZDtrF8HkxmPNwcCaVkrIMH9dGQzsewv3CPOhXrkVEJGaHuJe9CSw9v2Vj1HSJbSvu RwFa0aP16WzdqL9gLoEJVFs97i0UVHtr7IOMHzo0++LwUrjJLmtNEhKOCz2pW7RFo0OH udSs0ZJ/xCwySpwB6JQYSrbR2CkVYKtSH7n2zk0IXyto8xHuxgwJGqSuiAFG6Kc04tsS jJ0mp+fOdTpZUpSie2GFoJBBujnAkkYZ7mrXJKJ/1EWoJ7q7brR/K+rfEoGjnih9W3Os y3AA8aoYFWk19wHQGJoUY58T5JCsn8d7bEUejmOumtj52sOqOGGlOmcPAiiYHEJGD55W T6cQ== X-Gm-Message-State: AOAM533RHpqoZFKFQWVmAcoLZUYJuX7TYCUcUs10BBku3q/WLzyLbVhy IqcMQ90/z4U2xmIwJOrGaOWwDqwCaPM= X-Google-Smtp-Source: ABdhPJzE2wE1J0ZIoL+HprAC6Mtp8yKi0BiQ4skaceJ/ZbGbR8KjzywAeh9+3Prv8o103KN2V0p8iQ== X-Received: by 2002:a5d:58c9:: with SMTP id o9mr5716703wrf.181.1616625083009; Wed, 24 Mar 2021 15:31:23 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id i17sm4878101wrp.77.2021.03.24.15.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 15:31:22 -0700 (PDT) From: zimoun References: <87shoo7dgx.fsf@mdc-berlin.de> <87r34879o1.fsf@elephly.net> <87bmvc2vjn.fsf@gnu.org> <87lgug72vc.fsf@elephly.net> <87d1feep2q.fsf@gnu.org> <874m0q2087.fsf@elephly.net> Date: Wed, 24 Mar 2021 23:27:16 +0100 In-Reply-To: <874m0q2087.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 22 Jan 2017 23:34:00 +0100") Message-ID: <86r1k49ohn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 25425@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616625178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FHinleyZxpftRyTFcG97+4GF7F7g5DR31ciwnCcLL1M=; b=lldbXAgT2v5GYmOBdAT/xMl3Fh8a8WMijzxD6w3Zko3tCEgYXUeUaCOzex/2wrTQ6WccLo DT/hwAPMSFGBjT0eCkmEJxngUJZOA932QkAgvm9eBpZgS1GUDR6hshW4glnrVOmQNZlZPZ XSTDMqsNCzMEL2+JrBvf5+4EqTe/dDUOsick80ASvxrGh4IAcsPtApZ8TbuhDnlADvi9Mh wlHiiITQCPHJzEjzllO/Y46ibaPT3VoWEgXH2WrdSzn3kV6e+rB2lS+hZJAPWRe/8oCziX n0JNOak9hVsYw2Ur25pweAPvl+9CfeaKkOWAdCtjEm9QU0loLGIGPbrzopdmog== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616625178; a=rsa-sha256; cv=none; b=XG/9xDdxTvIbot8xs7/dv8etlTIZ8yH4fk+J9hS5SK7dXKQ9ULIKUdPHNTPJWNVaBhazeq 1aUuH471oj7dAIp/EP2oTdB9CVmMUUZwc3CqhGM6TZm81kL4mRFclTDFYsM2Wza8GZ+/gk Iz3wLTpUmFK3sanpl/k5JfuKVgrP+J3Ih/RYivo1BhJ1gx8tyn1F2pU5c5ec1VtOIPtby7 NRhSOZzl3w9S1Z+16Q1pbG5qKEvG6G0W9hpdYZpJZuA24pGiAp5es9r/7nTa9+mzzD4CPH qGgogXUhPhaD/cPdK3+my3cYVZq08JuaVcVAO3AIZnTqSBOcTwdaAsfO/IM7Mg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=gUCUleCD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=gUCUleCD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 7700015E7F X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9iMkH2gaIkLS Hi, This is an old bug about Lua and search path. It is still unsolved: --8<---------------cut here---------------start------------->8--- $ guix environment -C --ad-hoc lua lua-lpeg -- lua Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio > require('lpeg') stdin:1: module 'lpeg' not found: no field package.preload['lpeg'] no file '/usr/local/share/lua/5.3/lpeg.lua' no file '/usr/local/share/lua/5.3/lpeg/init.lua' no file '/usr/local/lib/lua/5.3/lpeg.lua' no file '/usr/local/lib/lua/5.3/lpeg/init.lua' no file './lpeg.lua' no file './lpeg/init.lua' no file '/usr/local/lib/lua/5.3/lpeg.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './lpeg.so' stack traceback: [C]: in function 'require' stdin:1: in main chunk [C]: in ? > --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ guix environment -C --ad-hoc lua lua-lpeg [env]$ export LUA_PATH=3D"$GUIX_ENVIRONMENT/share/lua/5.3/?.lua;$GUIX_ENVIR= ONMENT/share/lua/5.3/?/?.lua" [env]$ export LUA_CPATH=3D"$GUIX_ENVIRONMENT/lib/lua/5.3/?.so;$GUIX_ENVIRON= MENT/lib/lua/5.3/?/?.so" [env]$ lua Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio > require('lpeg') table: 0x23fd510 > --8<---------------cut here---------------end--------------->8--- On Sun, 22 Jan 2017 at 23:34, Ricardo Wurmus wrote: > Ludovic Court=C3=A8s writes: >> Ricardo Wurmus skribis: >>> Ludovic Court=C3=A8s 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=E2=80=99t work because Lua ex= pects >>> placeholders (=E2=80=9C?=E2=80=9D) in the search paths. The placeholde= rs 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 =E2=80=93 which= *will* be >>> the case for any of the files on LUA_PATH that have been generated by >>> the search-path-specification =E2=80=94 Lua will try to load the packag= e from >>> that path. >>> >>> This will fail because a search for the =E2=80=9Clpeg=E2=80=9D module w= ould be satisfied >>> by the file =E2=80=9Cre.lua=E2=80=9D, because that=E2=80=99s the first = valid file on the >>> LUA_PATH. =E2=80=9Cre.lua=E2=80=9D requires =E2=80=9Clpeg=E2=80=9D its= elf, so another lookup is >>> performed, which will again result in =E2=80=9Cre.lua=E2=80=9D to be lo= aded=E2=80=A6 >>> >>> AIUI we must generate a value for LUA_PATH that keeps the placeholders >>> intact. >> >> So are you saying that it=E2=80=99s important for the question marks to = remain >> intact? > > Yes, that seems to be the case. > >> This sounds terrible. I=E2=80=99m not sure how to address it, and I don= =E2=80=99t feel >> like stretching the search path mechanism this much. >> >> Thoughts? > > I agree. It=E2=80=99s a really odd special case. On the other hand, not > extending the search path mechanism would mean that we have to find > other ways to fix =E2=80=9Cguix environment=E2=80=9D, build phases, and p= rofiles when > Lua packages are involved. > > Build phases are easy to fix (by using a procedure that sets the > appropriate environment variables depending on the build inputs), but I > don=E2=80=99t know how to make profiles behave the way they should. Mayb= e it > would be fine to set a single value for LUA_PATH (and LUA_CPATH) that > assumes a single prefix (the profile path) and contains the necessary > placeholders. Is it fixable? All the best, simon