From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 5PlREslxn2CHFgEAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 09:01:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4MJADclxn2CfLAAAbx9fmQ (envelope-from ) for ; Sat, 15 May 2021 07:01:29 +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 086E21D50D for ; Sat, 15 May 2021 09:01:28 +0200 (CEST) Received: from localhost ([::1]:51228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhoIg-0002y5-Rn for larch@yhetil.org; Sat, 15 May 2021 03:01:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhoIW-0002xu-45 for guix-devel@gnu.org; Sat, 15 May 2021 03:01:16 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:23387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhoIT-0006O4-0I for guix-devel@gnu.org; Sat, 15 May 2021 03:01:15 -0400 Received: from [10.0.0.4] (91-114-247-246.adsl.highway.telekom.at [91.114.247.246]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FhxBV3Gn0z3x6y; Sat, 15 May 2021 09:01:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1621062066; bh=VBJwzQcE2HLFoWatb73K7BwSgLZpWSI92wz6HxBOfDU=; h=Subject:From:To:Date:In-Reply-To:References; b=ensOB21ScTe8SNr7am/Ro5uf+8IahdMJW4Gy8idH1yAO07ooYMfwzCtpah1GnfFgm IDKAZr1yeY04/4/sSCd24k21HpU9lHbkC1Q5FVeI4Pze24MZz7B1PbXcvZ2UXq96Vt Oe2xDSNEa7EIB7w3T4LxzaO6/vtUjumwYPccgxlQ= Message-ID: <7ab06ee76495f5018af94d667fa606433e217766.camel@student.tugraz.at> Subject: Re: Help me create a janet-build-system From: Leo Prikler To: Jack Hill , guix-devel@gnu.org Date: Sat, 15 May 2021 09:00:39 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 Received-SPF: pass client-ip=129.27.2.202; envelope-from=leo.prikler@student.tugraz.at; helo=mailrelay.tugraz.at X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621062089; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=VBJwzQcE2HLFoWatb73K7BwSgLZpWSI92wz6HxBOfDU=; b=U5uj7zh0rRFsjmVxGram38puq9EIJm5AZ2kY9jVvR+mJll5GasFwPc8ZMvlyTI+qXBuJoS QA8cqS9HpJO8lHCekGYqiq6/WTh/8ky+d3zOlPRM9DbBlNCU0HlWLFrK4EWhdgkEKXX+8n eO/wjYutxiHNEwx8poqYsB3fEQZgNaWDNzkNxKzJ9dyNVQ3Gwx1PiWUaeXeIpTljLOmak9 lVKyg87TPNSfUA5VWd/Drtl7qPaieChOa5Cdi90ct+qsFZ5FfOklYrxilJ9SR6uBBrNVlE kLgEIdil9UiMgjPFnEZWLqrdjrTaskBv3t4++xrh5EJpWIFslM3ku3YR9TUxCg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621062089; a=rsa-sha256; cv=none; b=o23VcRdXDXMDHDzR85RQ1cmjXC+tU0DJ1KJ9BmZwRDZpiEWKFIpBLwiCjW+ZEHxKd3Lwbn IZMjt9yDf+i/inWxtAayk4tR1I1zDaP+lLQt/9tC+jsQGNaTl+HxB28blVyzDlV/cJyj5Z KMayDnP/czGr8JKKfz7tRs1LE6MFI+g22tPbc3hJ4cWmY6GwXhf7tqueBCH0+oDnzt3TVg 9P20lLtC5OcgrnQm2Gh1PNFjPmtCw0gtyXlJHPwybIdgN01iOmhN6Y9hT/JdUbQS7fFCpG Wpfi7p/arUIbWmX/GD+n6NXREQgFxAdYOR+h81AY/y3aG9731obWBIb46IGHzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tugraz.at header.s=mailrelay header.b=ensOB21S; dmarc=pass (policy=none) header.from=student.tugraz.at; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tugraz.at header.s=mailrelay header.b=ensOB21S; dmarc=pass (policy=none) header.from=student.tugraz.at; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 086E21D50D X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7d5dNJBDqWww Am Samstag, den 15.05.2021, 01:07 -0400 schrieb Jack Hill: > Greetings Guix, > > I'm working on creating a build system for Janet [0] modules. This is > my > first time working with build systems, and while I have a much > better > understanding than when I started, I still don't understand it fully. > I've > attached my work in progress patches. The first five set the stage > by > updating and improving our Janet package. Patch six adds the build > system, > and patch seven adds an example package, janet-posix-spawn. > > [0] https://janet-lang.org > > Trying to build janet-posix-spawn results in: > > ``` > jackhill@alperton ~/repos/guix [env]$ ./pre-inst-env guix build > janet-posix-spawn > The following derivations will be built: > /gnu/store/y1xpmfaqswcmiwzpc1bgak18rbw2k4ad-janet-posix-spawn- > 0.0.1.drv > /gnu/store/w52ndznq3v42xxv4lfrpdlmwgn8r0f2x-module-import- > compiled.drv > building /gnu/store/w52ndznq3v42xxv4lfrpdlmwgn8r0f2x-module-import- > compiled.drv... > Backtrace: > In system/base/compile.scm: > 43:4 19 (call-with-output-file/atomic _ _ _) > In ice-9/boot-9.scm: > 1736:10 18 (with-exception-handler _ _ #:unwind? _ # _) > In system/base/compile.scm: > 59:11 17 (_) > 155:11 16 (_ #) > 235:18 15 (read-and-compile # syst?> ?) > 183:32 14 (compile-fold (#) > ?) > In ice-9/boot-9.scm: > 2806:4 13 (save-module-excursion _) > In language/scheme/compile-tree-il.scm: > 31:15 12 (_) > In ice-9/psyntax.scm: > 1241:36 11 (expand-top-sequence _ _ _ #f _ _ _) > 1233:19 10 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) > ?) > 285:10 9 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) > #) > In ice-9/eval.scm: > 293:34 8 (_ #) > In ice-9/boot-9.scm: > 3380:4 7 (define-module* _ #:filename _ #:pure _ #:version _ # _ > ?) > 2565:24 6 (call-with-deferred-observers _) > 3393:24 5 (_) > 222:29 4 (map1 (((guix build gnu-build-system) #:prefix gnu:) # > ?)) > 222:29 3 (map1 (((guix build utils)) ((guix utils)))) > 222:17 2 (map1 (((guix utils)))) > 3300:6 1 (resolve-interface (guix utils) #:select _ #:hide _ # _ > ?) > 1669:16 0 (raise-exception _ #:continuable? _) > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > no code for module (guix utils) > ``` > > What have I done wrong? Your code imports (guix utils), but (guix utils) is not present within the module closure present at build time. Did you mean (guix build utils)? > More generally, I expect there are many ways I could improve the > build system. What are they? I know little about jpm, but in my opinion you ought to let the user customize the flags passed on to jpm at least in the build target -- not so sure about check and install. If janet-build-system allows some degree of customization, consider also letting the user override the test-target. Regards, Leo