On 12-10-2022 23:51, Csepp wrote:
And yes, the error message could be clearer,
although I'm not sure where that should be fixed.

How about in the Guix code that uses the semver stuff?

Guile doesn't know
what packages correspond to what modules and it should probably stay
that way.

It doesn't need to know, e.g. Guix could do

(define-module (whatever) #:autoload (bar) (foo))

(define (foo-if-available)
  (catch 'unbound-variable
    (lambda () foo)
    (lambda _ #false)))

[...]

(define (stuff)
  (define foo (foo-if-available))
  (unless foo
(error "To use \"guix import crate\", you need to install guile-semver"))
  [... use foo ...])

Greetings,
Maxime.


Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to