Fork me on GitHub
#cljs-dev
<
2020-04-20
>
roman01la08:04:12

> Symbol Support 🎉

souenzzo11:04:19

I'm checking the fact at Output size minimized for trivial "Hello World" programs and I see that some releases of cljs has a output way larger then other ones. I will try to write a script and build a matrix . (manual result in first response on this thread. Do not use this thread!)

souenzzo11:04:27

$ cat src/foo/bar.cljs 
(ns foo.bar)

(.log js/console "ok")

# build: clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}}' -m cljs.main --optimizations advanced --output-to 1.10.439.js -c foo.bar
# du -h master.js 1.10.597.js 1.10.520.js 1.10.439.js 1.10.63.js 
4,0K	master.js
96K	1.10.597.js
8,0K	1.10.520.js
8,0K	1.10.439.js
92K	1.10.63.js

dnolen12:04:52

@souenzzo let's not use threads in this channel

dnolen12:04:20

@souenzzo writing a matrix for the change isn't that interesting in my opinion

dnolen12:04:55

it's just a test for artificially trivial programs - a very small number of users would rely on this aspect of DCE

dnolen12:04:18

@mfikes thanks! I might edit that to add some more rationale for the removals of the REPLs and a path for alternatives (and relevant new changes to make that easier)

dnolen13:04:19

@mfikes fixed CLJS-3230

👍 12
dnolen17:04:28

hrm yeah I was pretty sure Clojure didn't - I don't think this is a bug

axel18:04:05

Hi, I'm pretty thrilled by krell (https://github.com/vouch-opensource/krell). Looks very minimal which I like. But I have some difficulties requiring installed node modules. For example: I try to (require '@react-navigation/bottom-tabs) (also without the @) but to no avail. The doc reads "Because Krell uses the ClojureScript compiler to index node_modules, you can idiomatically require anything you've installed via yarn or npm just like any ClojureScript library." but I cannot make it work. Any help would be great. Completion on the REPL with (require ' + TAB shows many things but not the node module. Am I missing something? #noob

axel18:04:04

Yes, I already restarted Metro.

dnolen18:04:06

@axel that's not a valid symbol

dnolen18:04:02

however we changed ClojureScript a while back to support strings for the library name not just symbols

dnolen18:04:44

(ns foo.core (:require ["@react-navigation/bottom-tabs" :as rn-bottom-tabs])) or something like that

dnolen18:04:25

@axel also I'm answering Krell specific questions in #cljsrn

dnolen18:04:29

(require '"@react-navigation/bottom-tabs") should also work though we should probably enhance this to avoid the quoting since not really necessary here

axel20:04:31

Thanks a lot @dnolen. I will try this.