Subject: Re: [bug#43976] [PATCH] Chicken build system + some example eggs

From: Ludovic Courtès <[email-masked]>
Date: Sun, 18 Oct 2020 18:10:19 +0200

Hi!

raingloom <[email-masked]> skribis:

> Here it is, chicken-build-system.

Woohoo, really nice!  Great to welcome another Scheme in our home.  :-)

Overall the series LGTM.  Inline below are a few suggestions for minor
issues.

> # What's broken
> Cross-compilation has not been attempted beacuse the Go build system I
> based this on does not support it either.

That’s fine, it can come later if/when someone feels like it.

> # Necessary improvements
> The Go build system removes some references. I was not sure if this is
> needed for Chicken, so for now I left it out.

You can check the output of ‘guix size chicken-srfi-14’ (say).  If it
contains things that shouldn’t be there, like GCC or whatever, then
we should do something about it.

[...]

>>>From 502235505c75446758cc1932bd1ba333644423ca Mon Sep 17 00:00:00 2001
> From: raingloom <[email-masked]>
> Date: Mon, 12 Oct 2020 04:11:59 +0200
> Subject: [PATCH 01/11] gnu: Added search paths for Chicken Scheme.
>
> * gnu/packages/chicken.scm (chicken): Added search paths
>   [native-search-paths]: added CHICKEN_REPOSITORY_PATH and CHICKEN_INCLUDE_PATH

[...]

> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "CHICKEN_REPOSITORY_PATH")
> +            ;; TODO extract binary version into a module level definition.
> +            (files (list "var/lib/chicken/11")))
> +           (search-path-specification
> +            (variable "CHICKEN_INCLUDE_PATH")
> +            (files '("share")))))

Is it just share/, not share/chicken/ or something?  A Chicken-specific
directory name would be better, but if that’s really what Chicken
expects, then so be it.

Otherwise LGTM!

> From a734e591ad066c20a53f9d0f955716ba8422bac5 Mon Sep 17 00:00:00 2001
> From: raingloom <[email-masked]>
> Date: Tue, 13 Oct 2020 09:26:52 +0200
> Subject: [PATCH 02/11] guix: Added chicken-build-system.
>
> * guix/build-system/chicken.scm: New file.
> * guix/build/chicken-build-system.scm: New file.
> * Makefile.am: Add them.

Please mention it in doc/guix.texi under “Build Systems” with a
paragraph explaining the basics, as is done for the other build systems.

> --- /dev/null
> +++ b/guix/build/chicken-build-system.scm
> @@ -0,0 +1,103 @@
> +(define-module (guix build chicken-build-system)

Please add the GPLv3+ copyright header.

> +;; TODO how do we run tests???
> +
> +;; TODO remove references

You can remove the second TODO unless/until we have reasons to believe
this has to be done.

The first TODO is more problematic though.  Is there a standard way to
run tests?  It would be great if you could skim the packages you added
to see how they handle tests, so that ‘chicken-build-system’ can have a
‘check’ phase that follows common practice.

Otherwise LGTM!

>>>From a7e3b91b76625e01eed749c2c83a94862e3ef738 Mon Sep 17 00:00:00 2001
> From: raingloom <[email-masked]>
> Date: Tue, 13 Oct 2020 09:55:42 +0200
> Subject: [PATCH 04/11] gnu: Added imports for chicken eggs.
>
> * gnu/packages/chicken.scm: New module imports.

Usually we’d import modules in the patch where we first make use of
them.  Otherwise one might think this patch has no effect.

> +    (home-page "http://wiki.call-cc.org/eggref/5/srfi-69")
> +    (synopsis "An implementation of SRFI 69 with SRFI 90 extensions")

I think ‘guix lint’ won’t like that…

> +    (description
> +     "Hash table implementation and binary search")

… and a full sentence here would be welcome.  :-)

  https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html

Same for the other packages.

> +             (url (string-append "https://code.call-cc.org/svn/chicken-eggs/"
> +                                 "release/5/srfi-14/tags/" version))
> +             (revision 39057)
> +             (user-name "anonymous")
> +             (password "")))
> +       (sha256
> +        (base32
> +         "0wjsqfwawh9bx6vvii1gwag166bxkflc0ib374fbws14914g2ac1"))))
> +    (build-system chicken-build-system)
> +    (arguments '(#:egg-name "srfi-14"))
> +    (home-page "http://wiki.call-cc.org/eggref/5/srfi-14")
> +    (synopsis "Character set library")
> +    (description
> +     "Character sets can be created, extended, tested for the membership of
> +a characters and be compared to other character sets")
> +    (license (license:non-copyleft
> +              "file://srfi-14.scm"
> +              "See end of srfi-14.scm in the distribution."))))

You can use <http://wiki.call-cc.org/eggref/5/srfi-14#license> instead
of <file://...>.

The license looks weird indeed, but it looks like a valid free software
license.  The only discussion I found is at:
<https://srfi.schemers.org/srfi-14/mail-archive/msg00029.html>.

> From 52a27d11eb3d4d0ced3deda01fe901bf2f1937fd Mon Sep 17 00:00:00 2001
> From: raingloom <[email-masked]>
> Date: Mon, 12 Oct 2020 04:19:46 +0200
> Subject: [PATCH 11/11] gnu: Added myself to chicken.scm copyright.
>
> ---
>  gnu/packages/chicken.scm | 1 +
>  1 file changed, 1 insertion(+)

Please do that along with your first changes to the file.

That’s it.

Could you send a v2?

Thank you for working on it!

Ludo’.