guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitabl


From: Ludovic Courtès
Subject: [bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitable platform is found.
Date: Tue, 17 Jan 2023 10:22:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

>>> +++ b/gnu/packages/bootstrap.scm
>>> @@ -315,7 +315,7 @@ (define* (glibc-dynamic-linker
>>>                                   (%current-system))))
>>>    "Return the name of Glibc's dynamic linker for SYSTEM."
>>>    ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
>>> -  (let ((platform (lookup-platform-by-system system)))
>>> +  (let ((platform (false-if-exception (lookup-platform-by-system system))))
>>
>> Maybe we don’t need to protect here, because it’s a
>
> We cannot do this, otherwise the other cond clauses would never been
> evaluated:

Yes sorry, I realized later but hit “Send” before deleting the sentence
prototype.  :-)

>> So far the we use (srfi srfi-35) exclusively to define condition types;
>> I think we should do the same here, for consistency.
>
> Could we instead start migrating away from srfi-35 to (ice-9
> exceptions), which is the new native way to use exceptions in Guile?

Maybe, but I’m not convinced it’s worth it.

> I think it'd be nicer to use it in the future, to avoid newcomers
> being confusing about the 3 or 4 ways to manage exceptions in Guile

That’s why I suggest sticking to one way in Guix, which is currently
SRFI-34/35.

> Migrating the whole code at once doesn't seem a good idea, so gradually
> transitioning (such as using (ice-9 exceptions) for new code) appears a
> good idea to me, if we agree on the direction!

I’m not convinced it’s worth transitioning, and I’m even less convinced
about a gradual transition, as that would make it harder for newcomers
to join, people wouldn’t be sure which style to use, etc.

It’s a discussion worth having though, but I think we can have it
separately.

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]