|
331 | 331 | ([stacktrace opts]
|
332 | 332 | (doseq [{:keys [function file line column]}
|
333 | 333 | (mapped-stacktrace stacktrace opts)]
|
334 |
| - ((:print opts) "\t" |
335 |
| - (str (when function (str function " ")) |
336 |
| - "(" file (when line (str ":" line)) (when column (str ":" column)) ")"))))) |
| 334 | + (err-out |
| 335 | + (println "\t" |
| 336 | + (str (when function (str function " ")) |
| 337 | + "(" file (when line (str ":" line)) (when column (str ":" column)) ")")))))) |
337 | 338 |
|
338 | 339 | (comment
|
339 | 340 | (cljsc/build "samples/hello/src"
|
|
382 | 383 | (defn- display-error
|
383 | 384 | ([repl-env ret form opts]
|
384 | 385 | (display-error repl-env ret form (constantly nil) opts))
|
385 |
| - ([repl-env ret form f {:keys [print flush] :as opts}] |
| 386 | + ([repl-env ret form f opts] |
386 | 387 | (err-out
|
387 | 388 | (f)
|
388 | 389 | (when-let [value (:value ret)]
|
389 |
| - (print value)) |
| 390 | + (println value)) |
390 | 391 | (when-let [st (:stacktrace ret)]
|
391 | 392 | (if (and (true? (:source-map opts))
|
392 | 393 | (satisfies? IParseStacktrace repl-env))
|
393 | 394 | (let [cst (try
|
394 | 395 | (-parse-stacktrace repl-env st ret opts)
|
395 | 396 | (catch Throwable e
|
396 | 397 | (when (:repl-verbose opts)
|
397 |
| - (print "Failed to canonicalize stacktrace") |
398 |
| - (print (Throwables/getStackTraceAsString e)) |
399 |
| - (flush))))] |
| 398 | + (println "Failed to canonicalize stacktrace") |
| 399 | + (println (Throwables/getStackTraceAsString e)))))] |
400 | 400 | (if (vector? cst)
|
401 | 401 | (if (satisfies? IPrintStacktrace repl-env)
|
402 | 402 | (-print-stacktrace repl-env cst ret opts)
|
403 | 403 | (print-mapped-stacktrace cst opts))
|
404 |
| - (print st))) |
405 |
| - (print st)) |
406 |
| - (flush))))) |
| 404 | + (println st))) |
| 405 | + (println st)))))) |
407 | 406 |
|
408 | 407 | (defn evaluate-form
|
409 | 408 | "Evaluate a ClojureScript form in the JavaScript environment. Returns a
|
|
454 | 453 | (distinct (vals (:uses ast))))
|
455 | 454 | opts))
|
456 | 455 | (when *cljs-verbose*
|
457 |
| - (err-out ((:print opts) js))) |
| 456 | + (err-out (println js))) |
458 | 457 | (let [ret (-evaluate repl-env filename (:line (meta form)) wrap-js)]
|
459 | 458 | (case (:status ret)
|
460 | 459 | :error (throw
|
|
809 | 808 | ((ns-resolve 'clojure.core 'binding-conveyor-fn)
|
810 | 809 | (fn []
|
811 | 810 | (let [log-file (io/file (util/output-directory opts) "watch.log")]
|
812 |
| - (err-out (print "Watch compilation log available at:" (str log-file))) |
813 |
| - (flush) |
| 811 | + (err-out (println "Watch compilation log available at:" (str log-file))) |
814 | 812 | (try
|
815 | 813 | (let [log-out (FileWriter. log-file)]
|
816 | 814 | (binding [*err* log-out
|
|
0 commit comments