lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
johanatan 2018-05-24T00:04:35.000040Z

what is the current accepted way to use deps.edn with lumo ?

johanatan 2018-05-24T00:04:55.000302Z

i saw this thread but couldn't quite figure out what is going on: https://github.com/anmonteiro/lumo/issues/328

richiardiandrea 2018-05-24T00:17:25.000084Z

@johanatan this is what I do

cp=$(clojure -Srepro -C:dev -R:lumo-compile -Spath)
lumo -sfK -c "$cp" -n $port

richiardiandrea 2018-05-24T00:18:02.000262Z

I don't think lumo should call clojure directly or the whole no-JVM story would be lost

johanatan 2018-05-24T00:18:20.000321Z

yea, i understand how to get the classpath set properly. what i don't understand is how to get the things i want to specify in deps.edn to be downloaded into the classpath

richiardiandrea 2018-05-24T00:18:51.000271Z

clojure will download deps in .m2 for you

johanatan 2018-05-24T00:19:05.000189Z

from a file called deps.edn in the current dir?

richiardiandrea 2018-05-24T00:19:09.000213Z

yeah

johanatan 2018-05-24T00:19:12.000023Z

ah, got it

johanatan 2018-05-24T00:19:12.000355Z

thx!

richiardiandrea 2018-05-24T00:19:15.000353Z

np 😄

johanatan 2018-05-24T19:07:05.000718Z

hi

johanatan 2018-05-24T19:07:22.000740Z

can anyone share the right incantations for including a namespaced source file via --cp?

johanatan 2018-05-24T19:07:41.000363Z

i.e., both the ns declaration inside the file to be shared and the use on the receiving side

richiardiandrea 2018-05-24T19:07:43.000156Z

@johanatan how do you mean?

richiardiandrea 2018-05-24T19:08:00.000057Z

there is no special rule, it is just clojure

johanatan 2018-05-24T19:08:13.000447Z

well, clojure requires directories to exist with the namespace name yea?

johanatan 2018-05-24T19:08:20.000117Z

is that same requirement in play here?

richiardiandrea 2018-05-24T19:08:22.000638Z

same

johanatan 2018-05-24T19:08:26.000153Z

ah, ok

johanatan 2018-05-24T19:08:33.000485Z

i'll try that. thx

richiardiandrea 2018-05-24T19:09:02.000314Z

np!

johanatan 2018-05-24T19:11:06.000101Z

i'm getting:

cljs.user=> (use 'preamble.core)
            ⬆
Only [lib.ns :only (names)] and optionally `:rename {from to}` specs supported in :use / :use-macros; offending spec: [preamble.core] at line 1

johanatan 2018-05-24T19:11:13.000048Z

is use supported?

richiardiandrea 2018-05-24T19:16:13.000144Z

I think not in ClojureScript

richiardiandrea 2018-05-24T19:16:42.000403Z

you need :only

richiardiandrea 2018-05-24T19:16:53.000324Z

also use is frowned upon 😄

johanatan 2018-05-24T20:12:40.000017Z

hmm, in this particular case, i am basically defining a preamble of things i want to always be available. so i want to bring all of them in

johanatan 2018-05-24T20:12:49.000209Z

looks like require :refer [:all] isn't supported either?

johanatan 2018-05-24T20:12:58.000087Z

would be a real pain to list out every symbol here

johanatan 2018-05-24T20:20:00.000478Z

i suppose i will just go with :as and qualify all references

johanatan 2018-05-24T20:20:07.000078Z

[which isn't terrible]

johanatan 2018-05-24T20:36:49.000406Z

is anyone aware that -A warn seems more error-like than the result obtained via -A error ?

johanatan 2018-05-24T20:37:02.000197Z

[and neither really seem like errors]

johanatan 2018-05-24T20:37:24.000530Z

[it's just that the former is a warning including the word "error" and the latter is just a warning]

mfikes 2018-05-24T20:58:00.000614Z

One difference is that checked array warns should, at worst, cause noisy logging, while errors will cause exceptions to be thrown, stopping the show.

mfikes 2018-05-24T20:59:01.000100Z

A little more detail is here https://clojurescript.org/news/2017-07-14-checked-array-access#_new_compiler_enhancements

johanatan 2018-05-24T21:28:18.000314Z

yea, i'm not seeing that here

johanatan 2018-05-24T21:28:42.000147Z

as i said, "warn" seems to be producing results more in line with an "error" (although still not stopping the show) and "error" just produces a warning