unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 69380-done@debbugs.gnu.org
Subject: bug#69380: [PATCH] gnu: guile-irregex: Update to 0.9.11.
Date: Sat, 02 Mar 2024 17:13:13 +0100	[thread overview]
Message-ID: <87o7bwd33a.fsf@gnu.org> (raw)
In-Reply-To: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> (Tomas Volf's message of "Sun, 25 Feb 2024 14:26:08 +0100")

Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> Since upstream now provides tests for guile, they are executed, both before
> install (testing the internals) and after install (making sure the guile
> module and everything works well).
>
> Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "foo"),
> so symlinks are created to work around that.
>
> * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11.
> [arguments]: Convert to gexp.
> <#:phases>{'move-files-around}: Copy files instead of moving.
> {'check, 'check-installed}: New phases.
> (guile2.0-irregex)[arguments]: Add 'create-symlinks phase.
>
> Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e

Applied, thanks!

> +     (substitute-keyword-arguments (package-arguments guile-irregex)
> +       ((#:phases phases)
> +        #~(modify-phases #$phases
> +            ;; For some reason guile 2.0 cannot load foo.scm using
> +            ;; (load-from-path "foo").  So create symlinks to work around it.
> +            (add-before 'check 'create-symlinks
> +              (lambda _
> +                (use-modules (ice-9 regex))

As a rule of thumb, only write ‘use-modules’ at the top level.  Use
#:modules here.

I left it here because it doesn’t matter all that much, and because we
could/should probably remove ‘guile2.0-irregex’ anyway.

> +                (for-each
> +                 (lambda (f)
> +                   (symlink (regexp-substitute #f (string-match "/([^/]+)$" f)
> +                                               1 ".scm")
> +                            f))

I would avoid using regexps for such things: it’s heavyweight, hard to
read, and error-prone.  Looks like you could do away with just
‘basename’ and the likes, no?

Thanks,
Ludo’.




  reply	other threads:[~2024-03-02 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 13:26 [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11 Tomas Volf
2024-03-02 16:13 ` Ludovic Courtès [this message]
2024-03-03 16:57   ` Tomas Volf

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=87o7bwd33a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=69380-done@debbugs.gnu.org \
    --cc=~@wolfsden.cz \
    /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).