chicken-hackers
[Top][All Lists]
Advanced

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

Re: [PATCH] Quit compiling when an invalid import-Library declaration is


From: Mario Domenech Goulart
Subject: Re: [PATCH] Quit compiling when an invalid import-Library declaration is encountered
Date: Mon, 17 May 2021 21:28:30 +0200

On Fri, 23 Apr 2021 12:07:27 +1200 Evan Hanson <evhan@foldling.org> wrote:

> Thanks megane!
>
> On 2021-04-22 14:00, megane wrote:
>> ITYM it'll never trigger an error, even if the the filname is symbol for
>> example.
>
> In the use case where FILENAME is a string you will hit this:
>
>     $ csc -analyze-only - <<EOF
>     (declare (emit-import-library (foo "nope.import.scm")))
>     (module foo *)
>     EOF
>     
>     Error: (string) bad argument type: "nope.import.scm"
>
> That's how I originally ran into this.
>
> But, now that you mention it, on closer inspection the validation for
> this declaration doesn't even have the intended effect since invalid
> specifications will cause #<undefined> to be added to the alist of
> import libraries, leading to an error later in the compilation process:
>
>     $ csc -analyze-only - <<EOF
>     (declare (emit-import-library (foo nope.import.scm)))
>     (module foo *)
>     EOF
>     
>     Warning: invalid import-library specification: (foo nope.import.scm)
>     
>     Error: (assq) bad argument type: #<unspecified>
>
> Attached is a fix for *this* issue, in which we "quit-compiling" rather
> than warn when the declaration is invalid.
>
> Sorry I didn't notice this in the first place!

Thanks Evan and Megane.  I've pushed the patch.

All the best.
Mario
-- 
http://parenteses.org/mario



reply via email to

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