Subject: Re: [bug#67898] [PATCH v2] guix: import: composer: Handle parsing failures.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 05 Apr 2024 22:09:46 +0200

Hi,

Nicolas Graves <[email-masked]> skribis:

> * guix/import/composer (latest-release): Handle parsing
> failures. Rename package to composer-package for clarity.
>
> Change-Id: I14936c2c6e6a850a32fe56891766ae92b693a295

[...]

> +    (match composer-package
> +      (#f
> +       (format (current-error-port)
> +               "warning: failed to parse ~a~%"
> +               php-name)

Please use ‘warning’ from (guix diagnostics) instead.

Does #f necessarily indicate a parse error?  Couldn’t we have more
detailed info about the error?  (Not a blocker but it would be nice.)

> +       #f)
> +      (_
> +       (upstream-source

Nitpick: I’d suggest using a plain ‘if’ rather than ‘match’ in this case
since it’s a binary choice without destructuring.

Could you send an updated patch?

Thanks,
Ludo’.