[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55833: cross-base error: wrong type argument in position 1
From: |
Maxime Devos |
Subject: |
bug#55833: cross-base error: wrong type argument in position 1 |
Date: |
Wed, 08 Jun 2022 15:06:10 +0200 |
User-agent: |
Evolution 3.38.3-1 |
Josselin Poiret schreef op wo 08-06-2022 om 12:35 [+0200]:
> > * rename platform-linux-architecture to
> > '%platform-linux-architecture'
> > and define a wrapper 'platform-linux-architecture' displaying
> > a proper error message ‘unsupported target’ or such.
> >
> > and
> >
> > * use "riscv64-linux-gnu" instead of "riscv64-unknown-linux-gnu"
> > (as expected by (guix platforms riscv)).
>
> I don't think we should deviate from the usual behaviour of a
> procedure
> returning #f it wasn't able to find the thing it was searching for.
The proposal was to modify platform-linux-architecture, which doesn't
search for anything and doesn't return #false. It already throws an
exception:
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f
The proposal is to make the error message clearer, by raising an
exception ourselves instead of leaving it to struct-vtable.
(My proposal might have been confusing due to the mention of
lookup-platform-by-target-or-system which doesn't seem relevant on
second sight?)
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part