[ clisp-Bugs-3525509 ] CLISP treats CL:REQUIRE specially at compile time

SourceForge.net <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
Bugs item #3525509, was opened at 2012-05-10 05:48
Message generated for change (Comment added) made by xach
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3525509&group_id=1355

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: clisp
Group: lisp error
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zach Beane (xach)
Assigned to: Bruno Haible (haible)
Summary: CLISP treats CL:REQUIRE specially at compile time

Initial Comment:
I have a file "test.lisp" that contains only this:

  (require 'bogus)

When I start "clisp -ansi -norc" and issue (compile-file "test.lisp"), I get this:

    [1]> (compile-file "test.lisp")
    ;; Compiling file /home/xach/test.lisp ...
    *** - LOAD: A file with name BOGUS does not exist
    The following restarts are available:
    ABORT          :R1      Abort main loop
    Break 1 [2]> :bt
    <1/574> #<SYSTEM-FUNCTION SHOW-STACK> 3
    <2/567> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE>
    <3/561> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE>
    <4/552> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> 2
    <5/549> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-3>
    <6/545> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> 2
    <7/531> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2>
    <8/529> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
    <9/489> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP>
    <10/486> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1
    <11/481> #<SYSTEM-FUNCTION SYSTEM::ERROR-OF-TYPE>
    <12/457> #<COMPILED-FUNCTION LOAD>
    <13/443> #<COMPILED-FUNCTION SYSTEM::SIMPLE-REQUIRE>
    <14/438> #<COMPILED-FUNCTION REQUIRE>
    <15/430> #<COMPILED-FUNCTION SYSTEM::LOAD-OR-COMPILE>
    <16/425> #<COMPILED-FUNCTION SYSTEM::C-REQUIRE>
    [422] EVAL frame for form (SYSTEM::C-REQUIRE 'BOGUS)
    <17/419> #<SPECIAL-OPERATOR PROGN>
    [418] EVAL frame for form (PROGN (SYSTEM::C-REQUIRE 'BOGUS))
    <18/410> #<SYSTEM-FUNCTION EVAL>
    <19/408> #<COMPILED-FUNCTION SYSTEM::C-EVAL-AND-WRITE-LIB>
    [406] EVAL frame for form (SYSTEM::C-EVAL-AND-WRITE-LIB '(PROGN (SYSTEM::C-REQUIRE 'BOGUS)))
    <20/403> #<SPECIAL-OPERATOR PROGN>
    [402] EVAL frame for form (PROGN (SYSTEM::C-EVAL-AND-WRITE-LIB '(PROGN (SYSTEM::C-REQUIRE 'BOGUS))))
    <21/394> #<SYSTEM-FUNCTION EVAL>
    <22/387> #<COMPILED-FUNCTION SYSTEM::C-EVAL-WHEN>
    <23/365> #<COMPILED-FUNCTION SYSTEM::C-FORM>
    <24/343> #<COMPILED-FUNCTION SYSTEM::C-FORM>
    <25/340> #<COMPILED-FUNCTION SYSTEM::C-GLOBAL-FUNCTION-CALL>
    <26/319> #<COMPILED-FUNCTION SYSTEM::C-FORM>
    <27/315> #<COMPILED-FUNCTION SYSTEM::C-PROGN>
    <28/294> #<COMPILED-FUNCTION SYSTEM::C-FORM>
    <29/207> #<COMPILED-FUNCTION SYSTEM::C-LAMBDABODY>
    <30/198> #<COMPILED-FUNCTION SYSTEM::COMPILE-LAMBDABODY>
    <31/186> #<COMPILED-FUNCTION SYSTEM::COMPILE-TOPLEVEL-FORM>
    <32/42> #<COMPILED-FUNCTION COMPILE-FILE>
    [34] EVAL frame for form (COMPILE-FILE "test.lisp")
    Printed 32 frames

I am using 64-bit Linux. I get this error with CLISP 2.49 and CLISP from Mercurial.

Since REQUIRE is a function, I expected the error at runtime (when loading the file or its fasl), not at compile-time.

----------------------------------------------------------------------

>Comment By: Zach Beane (xach)
Date: 2012-05-10 05:51

Message:
Well, duh, I now see this is documented in the manual. However, this causes
a problem for  a real program that does (ignore-errors (require 'asdf)) in
an attempt to load the "system" ASDF if it is available. Since REQUIRE is
eagerly evaluated at compile time, the error isn't ignored as it should
be.

Any suggestions?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3525509&group_id=1355

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.