Fork me on GitHub
#shadow-cljs
<
2018-12-20
>
ahungry06:12:03

Does shadow cljs support specifying the clojure / clojurescript versions in the edn file? I would really like to use 1.10 for the new error reporting but my OS level install is 1.9 still

ahungry06:12:51

Oh, I suppose this answers that : `

ahungry06:12:52

WARNING: The org.clojure/clojure dependency in shadow-cljs.edn was ignored. Default version is used and override is not allowed to ensure compatibility. WARNING: The org.clojure/clojurescript dependency in shadow-cljs.edn was ignored. Default version is used and override is not allowed to ensure compatibility.

lilactown06:12:47

@m131 you can specify a diff version of either clojure or cljs if you use deps.edn or leiningen integration

lilactown06:12:19

I expect that you wont’ get much out of updating to Clojure 1.10, since you shouldn’t be writing much CLJ code with shadow-cljs?

lilactown06:12:46

and shadow-cljs is up to date with the currently released version of CLJS

ahungry06:12:43

oh, nice, thank you. Do the 1.9 features of spec work well in shadow-cljs / clojurescript?

ahungry06:12:01

I've been playing with clojure the last 3 or 4 months, loving it. Now attempting to write an npm lib/module in shadow-cljs

lilactown06:12:39

yeah, you have full access to clojure.spec.alpha in CLJS

ahungry06:12:50

my biggest pain-point now is unlike C-c M-j to just jack into a lein project automatically, it seems I have to start a shadow-cljs repl in the terminal and use cider-connect and then manually type a port - is that usual?

ahungry06:12:14

and while that is annoying, it always defauls to clj not cljs, so then I must run (shadow.cljs.devtools.api/node-repl :dev) by hand in the repl to get to the app / node repl I guess?

ahungry06:12:20

(Emacs btw)

lilactown06:12:57

I haven’t messed around with connect to a REPL for an npm lib before

ahungry06:12:01

its good when its all set up, I can dev for awhile, just very cludgy (I guess I could write some custom elisp to auto insert the text in repl for me)

lilactown06:12:46

when developing for the browser, or for a Node.js server, I just run cider-jack-in-clojurescript and it starts shadow-cljs and connects me to the REPL

ahungry06:12:48

cider supports a C-c M-J command for cljs jack in, and I see that launches some type of nrepl with npx / shadow, but it then tries to open a browser ,which is useless for me

ahungry06:12:01

nice, so, probably not a real common workflow i'm doing

ahungry06:12:11

(trying to write a generic node/npm package in clojurescript)

lilactown06:12:29

yeah for Node.js, I omit opening the browser page and instead start my node.js server

lilactown06:12:01

I think there’s a command to just start a node-repl from a terminal, but i’m not sure if it starts nREPL

lilactown06:12:54

what build target are you using?

ahungry06:12:02

node-library

ahungry06:12:34

well, thank you for the help - gonna hit the hay, hopefully someone has solved this and is in the channel, or i'll whip up some abomination of elisp to auto-connect as needed and come share my findings tomorrow night or so 😆

lilactown06:12:52

I would expect, based on the user guide, that you could start a watch build like normal and then run the compile Node.js script

lilactown06:12:02

in which case you could probably use the normal cider-jack-in-clojurescript

lilactown06:12:12

but I don’t have time to try it - gotta leave as well 😄 good night!

pez08:12:32

I am pretty sure I've seen shadow jack-in code in cider. But, i might have dreamt it up too…

aisamu14:12:36

IIRC, it asks for a repl type when you jack-in (either shadow or shadow-choice or something like it)

justinbarclay14:12:44

I know for browser I can cider-jack-in-cljs, choose shadow-cljs, and then I get a couple of prompts such as which build I’d like to use. This was very similar to how I jacked in to lein,

Whiskas21:12:14

there are people using webpack with shadow-cljs?