Fork me on GitHub
Jakub Zika04:05:01

Hi, do you know if there have ever been efforts to make clojurescript emmit human-readable javascript like rescript does for example? What prevents this from happening?


If I recall correctly one of the options for the closure compiler is pretty printed output


Determines whether the JavaScript output will be tabulated in a human-readable manner. Defaults to true.
☝️:skin-tone-2: Defaults to true. I guess you'd also need :optimizations :none to have comprehensible JS produced.



Defaults to :none.
for :optimizations. @zikajk Does that default behavior not do what you want?


:pseudo-names is also really helpful, it makes the advanced compilation use names based on the source instead of random symbols


Is there a means of determining whether a clojurescript release in maven is an "official" release or not? I'm using liquidz/antq to detect and upgrade dependencies and it recently bumped clojurescript to the 1.11.50 release which I believe wasn't as an official release. antq soon bumped to the subsequent official releases when they appeared but ideally i'd liked an automated means of keeping to the official releases. Or am I needlessly worrying and it would be fine to use any clojurescript release in maven?


not afaik. Clojurescript has not used RC or alpha/beta releases as long as I've been using it.


Aren't the releases that are not mentioned in the a defacto beta-release?, as in they are not being recommended for use, though their presence in maven caused antq to automatically upgrade to them


yes that's my understanding


@zikajk as mentioned Closure can pretty print, but we've never been interested in generating human-readable JavaScript


ClojureScript is different enough from JavaScript that such a goal has very little value


you would never hand write the code we generate and that is intentional


Oops sorry!

Jakub Zika12:05:03

Thanks @dnolen @seancorfield @augustl I would like to check the result of optimization :none but I cant get the configuration right. I am following and when I have :main as a string it will fail.

{:optimizations :none
 :main "cljs-kata.core"
 :output-dir "resources/public/js"
 :deps {org.clojure/clojurescript {:mvn/version "1.10.758"}}}
➜ clj -M -m cljs.main -c cljs-kata.core Execution error (FileNotFoundException) at .FileInputStream/open0 ( c (No such file or directory)

Jakub Zika12:05:46

Changing it to

:main ["cljs-kata.core"]
leads to cljs-kata.core (No such file or directory)


the namespace is generally not a string


the guides don't ever refer to it as a string I'm pretty sure


:main cljs-kata.core

Jakub Zika13:05:03

I hope I’m not hallucinating :-)


that is a doc problem


where does cljs-kata.core live, it should probably be src/cljs_kata/core.cljs note the underscore

Jakub Zika13:05:17



can you have deps in the cljs build config file? :thinking_face:


right, it will have no effect


maybe the issue is that it can't find cljs.main, not clear from the error message, as the dependency is added in the cljs build config instead of deps.edn

Jakub Zika13:05:38

@augustl On the contrary, I wrote everything you see in deps.edn. Just like I’m used to from the lein 🙂

Jakub Zika13:05:05

Google always refers me to shadow-cljs. Can anyone tell me how to do this in pure cljs? Thanks


the Quick Start covers this


I highly recommend following it exactly, and things will be clearer

👍 1
Jakub Zika13:05:28

Great, I get it. I was confused by the compiler documentation, which leads to the use of maps.


@zikajk some bad docs, I fixed these up, thanks for pointing those cases out

👍 1

does anyone know why clojurescript change-logs skips over version 1.10.773 / where I can find those logs??

👀 1