ClojureScript

Not exporting set-print-fn! makes it inaccessible after advanced compilation

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

clojurescript.test has long provided a set-print-fn!, which I believe was what originally provoked the addition of one to cljs.core. This commit made it so that it was no longer {{^:export}}ed, which makes using it from e.g. external test runners running advanced mode compiled scripts impossible.

I suspect the ^:export was removed to make it possible for Google Closure to shake out all the printing stuff? That's nice of course, but not having it available under advanced compilation obstructs the original motivation of having the function in core to begin with.

I'm happy to just continue to have a set-print-fn! in clojurescript.test if necessary, but then I'd suggest deprecating/removing the core one.

Activity

Hide
David Nolen added a comment -

We're not going to deprecate the core one - it's plenty useful to people outside of advanced, think Node.js and other targets. Users that need printing in advanced can export their own thing.

Show
David Nolen added a comment - We're not going to deprecate the core one - it's plenty useful to people outside of advanced, think Node.js and other targets. Users that need printing in advanced can export their own thing.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: