This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-19
Channels
- # announcements (1)
- # asami (75)
- # beginners (16)
- # calva (14)
- # cider (4)
- # clj-kondo (11)
- # cljs-dev (3)
- # clojure (110)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (38)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-taiwan (1)
- # clojure-uk (2)
- # clojurescript (34)
- # conjure (1)
- # data-science (9)
- # datahike (7)
- # datalevin (1)
- # datascript (1)
- # datomic (5)
- # etaoin (1)
- # fulcro (23)
- # graalvm (50)
- # helix (4)
- # hyperfiddle (8)
- # introduce-yourself (1)
- # jobs (3)
- # kaocha (10)
- # malli (8)
- # mid-cities-meetup (1)
- # minecraft (1)
- # off-topic (13)
- # pathom (14)
- # polylith (38)
- # reitit (1)
- # releases (1)
- # sci (65)
- # shadow-cljs (28)
- # specter (12)
- # tools-deps (8)
- # vim (1)
- # vscode (11)
- # xtdb (31)
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
:pretty-print
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.And:
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 https://clojurians.slack.com/archives/C07UQ678E/p1652376126915619 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 https://github.com/clojure/clojurescript/blob/master/changes.md 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
@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
Thanks @dnolen @seancorfield @augustl I would like to check the result of optimization :none but I cant get the configuration right. I am following https://clojurescript.org/guides/quick-start 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 (FileInputStream.java:-2).
c (No such file or directory)
Changing it to
:main ["cljs-kata.core"]
leads to
cljs-kata.core (No such file or directory)
where does cljs-kata.core
live, it should probably be src/cljs_kata/core.cljs
note the underscore
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
@augustl On the contrary, I wrote everything you see in deps.edn. Just like I’m used to from the lein 🙂
Google always refers me to shadow-cljs. Can anyone tell me how to do this in pure cljs? Thanks