<< Back to previous view

[CLJS-665] Not exporting set-print-fn! makes it inaccessible after advanced compilation Created: 06/Nov/13  Updated: 06/Nov/13  Resolved: 06/Nov/13

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Chas Emerick Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


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.

Comment by David Nolen [ 06/Nov/13 11:40 AM ]

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.

Generated at Thu Jan 18 10:07:19 CST 2018 using JIRA 4.4#649-r158309.