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

Re: issue COMPILER-DIAGNOSTICS, version 2

> (1) Clarify that COMPILE-FILE is allowed to print messages indicating the
>     normal progress of the compilation.

Print them where?  Maybe these should go somewhere like *TERMINAL-IO*
instead of *STANDARD-OUTPUT* because you wouldn't normally want them in
a dribble file.

> (4) Specify that COMPILE-FILE returns the pathname for the output file if
>     it was able to successfully compile the input file. 

Could we specify that it returns the TRUENAME of the output file?

>        However, if
>     ERRORs occur and the compiler is able to recover and return normally,
>     it should return NIL to indicate unsuccessful completion.

There are actually more than two possibilities:
  1. No problems.
  2. Warnings.  The program can be loaded and run, but may not do what
     the programmer intended.
  3. Errors were detected that will cause a runtime error upon
     attempting to execute the faulty expression.
  4. Errors were detected that caused no code to be generated for one or
     more top-level forms.  Thus there may be whole functions simply
     missing from the object file.
  5. No object file could be written, or what was written can't be

Clearly it should return NIL for case 5, maybe for case 4, probably not
for case 3.

There is one more possibility, that either the input file or output
file could not be opened, but I don't think it is desirable for
COMPILE-FILE to catch that error.

> Current Practice:

On the Explorer, COMPILE-FILE displays the name of the function being
compiled when the option :VERBOSE T is given or special variable
COMPILER:COMPILER-VERBOSE is true.  It tries to catch most errors and
turn them into warnings (except for errors on opening a file), but the
user can change special variable COMPILER:WARN-ON-ERRORS to NIL if he
wants to enter the debugger on an error signalled during reading, macro
expansion, or compile-time evaluation.  The true name of the output file
is returned as the first value.  A second value indicates whether any
errors or warnings were reported.