lumo 2018-05-24

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

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

@johanatan this is what I do

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

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

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

clojure will download deps in .m2 for you

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

yeah

ah, got it

np 😄

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

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

@johanatan how do you mean?

there is no special rule, it is just clojure

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

is that same requirement in play here?

same

i'll try that. thx

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

is use supported?

I think not in ClojureScript

you need :only

also use is frowned upon 😄

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

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

would be a real pain to list out every symbol here

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

[which isn't terrible]

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

[and neither really seem like errors]

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

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

yea, i'm not seeing that here

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