File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 464
464
:source-form form}
465
465
:repl-env repl-env})
466
466
def-emits-var (:def-emits-var opts)
467
+ backup-comp @env/*compiler*
467
468
->ast (fn [form]
468
469
(binding [ana/*analyze-deps* false ]
469
470
(ana/analyze (assoc env :def-emits-var def-emits-var )
503
504
; ; NOTE: means macros which expand to ns aren't supported for now
504
505
; ; when eval'ing individual forms at the REPL - David
505
506
(when (#{:ns :ns* } (:op ast))
506
- (let [ast (ana/no-warn (ana/analyze env form nil opts))]
507
+ (let [ast (try
508
+ (ana/no-warn (ana/analyze env form nil opts))
509
+ (catch #?(:clj Exception :cljs js/Error) e
510
+ (reset! env/*compiler* backup-comp)
511
+ (throw e)))]
507
512
(load-dependencies repl-env
508
513
(into (vals (:requires ast))
509
514
(distinct (vals (:uses ast))))
You can’t perform that action at this time.
0 commit comments