From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ON9lLX5MMmAubwAA0tVLHw (envelope-from ) for ; Sun, 21 Feb 2021 12:05:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oGVJKX5MMmD9AwAA1q6Kng (envelope-from ) for ; Sun, 21 Feb 2021 12:05:18 +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 A16A118ACE for ; Sun, 21 Feb 2021 13:05:17 +0100 (CET) Received: from localhost ([::1]:41954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDnUC-0005V6-4f for larch@yhetil.org; Sun, 21 Feb 2021 07:05:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDnU2-0005Um-SF for guix-patches@gnu.org; Sun, 21 Feb 2021 07:05:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDnTy-0007KC-MX for guix-patches@gnu.org; Sun, 21 Feb 2021 07:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDnTy-00057F-HB for guix-patches@gnu.org; Sun, 21 Feb 2021 07:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46231] Add emilua Resent-From: =?UTF-8?Q?Vin=C3=ADcius?= dos Santos Oliveira Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Feb 2021 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46231 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Nicolas Goaziou Cc: 46231@debbugs.gnu.org Received: via spool by 46231-submit@debbugs.gnu.org id=B46231.161390909919654 (code B ref 46231); Sun, 21 Feb 2021 12:05:02 +0000 Received: (at 46231) by debbugs.gnu.org; 21 Feb 2021 12:04:59 +0000 Received: from localhost ([127.0.0.1]:53628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDnTv-00056v-CN for submit@debbugs.gnu.org; Sun, 21 Feb 2021 07:04:59 -0500 Received: from mail-io1-f52.google.com ([209.85.166.52]:38934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDnTl-00056b-SC for 46231@debbugs.gnu.org; Sun, 21 Feb 2021 07:04:57 -0500 Received: by mail-io1-f52.google.com with SMTP id s24so10370510iob.6 for <46231@debbugs.gnu.org>; Sun, 21 Feb 2021 04:04:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PZCW07LHp2gdDaVKAuaKNC2c9UwaTFSUbcplPg8cfEA=; b=lGvEDmf1ff2IrKcwwJc4+SdHxc2LCIn0EcAZdcI1rMu3/d/oFs1990YdIMk4YMU291 OTNpIltCMazsO5CoWHWMGpnSVUqZe0IYzOk9Xwxq1wbBBDU92RVPJgyATV2BWxuh5wx2 gdJ4sEI9C9o8dDXi19vS668VO7xju3Lt4TkXfN82/HdM1KW3G6ut5odAspTFjR9rp83b KY922V6cFgBlVtK5gvoiNcnaLDlIf0dyW/zVQQ/EJ8wnlivpEgYIe7wj0RPpoCoKz/Xw G+wyEH3UDpCABUzhbwSjBokN69DAoJmLpy/sDFns6aZer7QIcHQXt9gy5dMQf3zpTzTQ rnWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PZCW07LHp2gdDaVKAuaKNC2c9UwaTFSUbcplPg8cfEA=; b=WC+9oxCmYMavIc0NnHfwTBBQMV2R43L1MWkkWYbFiPRML2q1F+IqPTN9PJzEzNyYqF 2RbCA/JbOxCOj2UU8yQBxVNkj3t8HIYhAIEa37ZgHcnzpVKTBAr0fN2Jlqnl7NJv538L P/DCW+FKnBFTkREfxBWhmo+DkG3HegJXEVsgSjttYh0A1kDkmqNF4399a2JptLxSmh+A meLjtbRGGwQrsQ6JYUknzp+jMw7InoHWRBeCD18uiBv9rFC64FaZtJdao8AXNR0dySKq pkGm1vkSM29wuKGnZex8NPSR2qMMqaI6dGwXYW/4ZVPmZnBrSLokn8Fk4+wsQ4mN6l4s trFA== X-Gm-Message-State: AOAM530wtpo0YMJSIg7/ClA2xU0lACixyMm9TPl3vqRmtBo6JK+qDoVN ALQmy1Cejb/KCWd8XoteToghWstbYP3e9utPNVhtaoP3Uso= X-Google-Smtp-Source: ABdhPJz5CeERREb1ov7Mv5QhkXgUPbtVhvwpukoqunYGJHgM/Ur3CQmvDR6rW7EXTqD9wdpNyR40y3rnIraguj1jnyE= X-Received: by 2002:a02:ceb6:: with SMTP id z22mr18284260jaq.73.1613909084250; Sun, 21 Feb 2021 04:04:44 -0800 (PST) MIME-Version: 1.0 References: <875z2mxljt.fsf@nicolasgoaziou.fr> In-Reply-To: <875z2mxljt.fsf@nicolasgoaziou.fr> From: =?UTF-8?Q?Vin=C3=ADcius?= dos Santos Oliveira Date: Sun, 21 Feb 2021 09:04:25 -0300 Message-ID: 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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=lGvEDmf1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A16A118ACE X-Spam-Score: -1.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6wZF48IfRnN8 Em s=C3=A1b., 20 de fev. de 2021 =C3=A0s 22:21, Nicolas Goaziou escreveu: > There are some issue to fix: > - the name of the custom luajit2 package should be changed. Maybe > openresty-luajit? > - that package should have a proper version and build tag out of it. I've used "define" instead "define-public" so it wouldn't be really available elsewhere in the system. However after some thought I do agree that this dependency can be generally useful to more people and should have a proper name. What do you think about the name openresty-luajit-lua52? > - I see that emilua uses #:recursive? set to #true. Could some > submodules could be unbundled by any chance? Some, yes, but not all. A Debian packager asked me the same and I already started to unbundle the dependencies where it can make sense to use the one found in the system. I can offer more details on why a few dependencies still must be provided as submodules if requested. Next emilua version (a couple of weeks away) should use more dependencies from the system and less bundled dependencies, but you'll still need #:recursive? set to #true for the bundled dependencies that will remain. > - You disabled tests. I would be nice to provide a reason for that. This is how the tests are run: 1. The emilua binary is generated. 2. The emilua binary is executed against every *.lua file inside the test d= ir. 3. An output is generated and compared against the matching *.out file inside the same dir. 4. If they differ, the test fails. There are two types of tests: * Good test cases. No error expected. * Bad test cases. Buggy code is feeded to the runtime to see if it is able to detect the error. On exceptions (the bad test cases), Lua throws an error string and Emilua will print the stacktrace. The stacktrace is generated by the Lua VM and contains paths to the files involved. This path will be different in every machine you run the tests as you probably will store the source code in different paths. Here's an example: $ emilua test/interrupt7.lua Main fiber from VM 0x7f1f133d1380 panicked: 'Invalid argument' stack traceback: /home/me/emilua/test/interrupt7.lua:5: in main chunk [C]: in function '' [string "?"]: in function <[string "?"]:0> So I filter the test output using an AWK script that replaces the filename by "input.lua". Here's the translation line: https://gitlab.com/emilua/emilua/-/blob/ded59fa9d4bb8977aed40fb7b683c6403b4= 62f28/test/run_test.awk#L60 This filter ensures that a path in the likes of "/home/me/emilua/test/interrupt7.lua" will be spit as "input.lua". That makes the output predictable so I can write the *.out files that reference input.lua. Here's the matching test/interrupt7.out from the previous run: Main fiber from VM 0x1 panicked: 'Invalid argument' stack traceback: input.lua:5: in main chunk [C]: in function '' [string "?"]: in function <[string "?"]:0> Unfortunately this strategy is not enough. The Lua VM will shorten paths by excluding some of its parts and replace them by "..." when they are too long. That's why the script has this rule: https://gitlab.com/emilua/emilua/-/blob/ded59fa9d4bb8977aed40fb7b683c6403b4= 62f28/test/run_test.awk#L4 However running the tests from the guix build unveiled yet another problem with this script. If even longer paths are at play (as in the guix build), the Lua VM will apply a different shortening algorithm to the paths sometimes. So the tests run, the emilua binary will do the right thing, but the translation script won't work on one of the test cases and will raise a false negative. I intend to solve this issue and I already started to investigate so it'll eventually be solved, but in the meantime I just disabled the tests. I don't control the paths the Lua VM generates so improving the AWK script is really my only choice here. > - You don't need `string-append' in the description. Just write the full > textin a single string. Okay. > Could you split this into two patches and send them here, for easier revi= ew? Sure. Let's get the openresty-luajit-lua52 package in first and then I'll work on the second patch. Here's the patch for openresty-luajit-lua52 alone: https://gitlab.com/emilua/emilua/-/snippets/2079960 --=20 Vin=C3=ADcius dos Santos Oliveira https://vinipsmaker.github.io/