unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: Jack Hill <jackhill@jackhill.us>, guix-devel@gnu.org
Subject: Re: Help me create a janet-build-system
Date: Sat, 15 May 2021 09:00:39 +0200	[thread overview]
Message-ID: <7ab06ee76495f5018af94d667fa606433e217766.camel@student.tugraz.at> (raw)
In-Reply-To: <alpine.DEB.2.21.2105150054190.2109@marsh.hcoop.net>

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 (_ #<closed: file 7ffff69868c0>)
>     235:18 15 (read-and-compile #<input: guix/build/janet-build-
> syst?> ?)
>     183:32 14 (compile-fold (#<procedure compile-tree-il (x e opts)>)
> ?)
> 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 (_ #<module (#{ g32}#) 7ffff697ac80>)
> 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



  reply	other threads:[~2021-05-15  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15  5:07 Help me create a janet-build-system Jack Hill
2021-05-15  7:00 ` Leo Prikler [this message]
2021-05-15 19:25   ` Jack Hill
2021-05-15 19:55     ` Leo Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ab06ee76495f5018af94d667fa606433e217766.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=guix-devel@gnu.org \
    --cc=jackhill@jackhill.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).