Ralf Hemmecke wrote:
> 
> On 01/14/2015 12:43 PM, Ralf Hemmecke wrote:
> > Unfortunately, I cannot find where to abort the spad compilation with a
> > non-zero exit code (when ")set breakmode quit" is active).
> > 
> > What would be the best place to check the status of the compilation and
> > execute EXIT-WITH-STATUS in case of a failing compilation?
> 
> Meanwhile I've detected the function 'spadCompile'
> 
> https://github.com/fricas/fricas/blob/master/src/interp/scwrap2.boot#L87
> 
> that seems to be called when ")compile foo.spad" is invoked.
> 
> This function always returns true. Does that have any meaning?
> 
> It also seems that the compilation failed if $ncMsgList is not nil.
> Is that really the case? I somehow doubt, because there might also be
> messages, that don't signal an error.
> 
> Or is the compilation aborted elsewhere and I cannot easily detect (and
> catch) a failing compilation?

Look at 'compDefineLisplib' in lisplib.boot: it gets status of
compilation into variable 'ok' and renames .erlib directory
to .NRLIB is case of success.  'compDefineLisplib' has its
own return value so you loose info about success or failure
after return from it (I think that return value will be Lisp
nil in case of failure).  Deeper than 'compDefineLisplib'
you can not detect failure: compiler is backtracking and partial
failure do not mean failed compilation.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to