[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Evan Hanson |
Date: |
Fri, 23 Apr 2021 12:07:27 +1200 |
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!
Evan
0001-Quit-compiling-when-an-invalid-import-Library-declar.patch
Description: Text document