title: SBCL: CONTINUE restart absent during COMPILE? (really was:absent in HANDLER-CASE)
body: <p>In using <code>swig</code> to wrap a C++ library, I had been attempting to bypass a compile-time <code>error</code> of an un<code>eql</code> constant being redefined … in this case, to an <code>equal</code> but un<code>eql</code> string literal. </p>
  
  <p>Strangely, in SLIME I was able to simply invoke the <code>CONTINUE</code> restart and bypass this particular error. However, when I try to wrap it with a <code>handler-case</code> and build it via either <code>compile-file</code> or <code>slime-compile-file</code> or via <code>buildapp</code>, the <code>CONTINUE</code> restart seems to be missing. <code>(format t "Restarts: ~{~% • ~A~%   ~:*~S~}" (compute-restarts))</code> concurs.
  Just to be paranoid, I've tried:</p>
  
  <pre><code>   (continue)
     (invoke-restart 'continue)
     (invoke-restart (find-restart 'cl::continue))
  </code></pre>
  
  <p>and a few variations. </p>
  
  <p><code>(unless (continue) (warn "Can't continue"))</code> is also, strangely, not warning me, but the compilation doesn't finish the file, either. </p>
  
  <p>Due to some more awful cases of C++ polymorphism that I want to convert to keyword arguments, I'm continuing onwards with a copied and edited version of the <code>swig</code> generated code, but I'm curious why the restart would be absent and whether I could have done something (some hard-to-locate dynamic setting, perhaps) that would bypass it. </p>
  
  <p><em>Edit:</em> Lest it be helpful, one variaton has been:</p>
  
  <pre><code>(handler-case
    (compile-file "path/to/swig-made-this-mess")
    ;; contains (defconstant foo "string")
  
    #+sbcl
    (SB-EXT:DEFCONSTANT-UNEQL (condition)
      (let ((name (SB-EXT:DEFCONSTANT-UNEQL-NAME condition))
            (before (SB-EXT:DEFCONSTANT-UNEQL-OLD-VALUE condition))
            (after (SB-EXT:DEFCONSTANT-UNEQL-NEW-VALUE condition)))
        (if (equal before after)
            (progn
              (warn "Redefining constant to un-EQL but EQUAL value~%~S ← ~S"
                    name after)
              (unless (continue)
                (warn "Unable to CONTINUE~%~%Restarts:~{~% • ~A~%     ~:*~S~}"
                      (compute-restarts))
                (signal condition)))
            (progn
              (warn "Redefining constant to un-EQUAL value:~%~S ←~%before: ~S~%after: ~S"
                    name before after)
              (signal condition))))))
  </code></pre>