Clojurians
#cljs-dev
<
2017-11-21
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes15:11:52

Has there been discussion around a compiler option that could strip docstrings from output (perhaps useful when :advanced and trying to reduce output size)?

mfikes16:11:27

My motivation for asking is the effect https://dev.clojure.org/jira/browse/CLJS-2407 has on code size

dnolen17:11:42

@mfikes I thought docstrings became comments, so stripped no?

rarous17:11:13

Cljs docs are meta not JS code comments

dnolen17:11:06

@rarous pretty sure they get compiled into comments, docstring are not runtime meta, just compiler meta

mfikes17:11:33

I grepped for the docstring for cljs.core/map and found it in builds/out-adv/core-advanced-test.js, and mistakenly assumed all were appearing. I can see that others like cljs.core/first are present, but not cljs.core/iterate. I'll see if I can sort out what the difference is.

mfikes17:11:27

Perhaps it is the result of applying var to some of those Vars or some other suitable explanation.

mfikes18:11:12

Yeah, sorry for the noise. The presence of docstrings in the output is explainable by the few places where var is used.