Fork me on GitHub
#shadow-cljs
<
2019-06-10
>
thheller08:06:14

@trevor670 looks like you are trying to eval the ns in a CLJ REPL rather than a CLJS REPL

Trevor13:06:53

Thanks @thheller, I do choose 'CLJS' from the cursive REPL dropdown, but is there something else I should do too?

thheller13:06:09

that select box does nothing

thheller13:06:38

as I said you need to eval (shadow/repl :your-build-id). that will also automatically switch the select box

Trevor13:06:13

awesome! Thanks!

Trevor16:06:41

hahahahahaha it wooooorks!!! Thanks @thheller!!

thheller08:06:42

make sure you switched to your build REPL first via (shadow/repl :your-build-id)

👍 1
🎉 1
thheller08:06:31

@jiyinyiyong yeah that data isn't very accurate. It doesn't parse project.clj or deps.edn. only package.json and pom.xml

👍 2
mynomoto14:06:15

Hi, does shadow expose a socket prepl? Looking at the docs looks like it doesn't.

thheller14:06:16

@mynomoto it does. :socket-repl {:port 1234} in shadow-cljs.edn

mynomoto14:06:39

@thheller is that a simple socket-repl or a prepl?

thheller14:06:59

simple socket repl

mynomoto14:06:34

Ok, the tooling I want to use depends on a prepl. Is there a way to get one currently?

thheller14:06:02

same way you'd get one everywhere else

thheller14:06:19

but in general prepl isn't well supported currently

mynomoto14:06:26

I'm on tooling bleeding edge. @olical conjure uses one for clojurescript on figwheel land, I want to try it over shadow.

thheller14:06:14

I didn't spend too much time on prepl yet since it doesn't solve the "upgrade" problem

mynomoto14:06:43

What is the upgrade problem?

thheller14:06:57

starting a CLJS prepl from a CLJ prepl

thheller14:06:41

feel free to open an issue about prepl. I can look into it in a few days

mynomoto14:06:12

Ok, thanks!

Olical15:06:24

Interested in the upgrade problem since I never really saw it as a problem. I know with nREPL and stuff you connect to a Clojure REPL then somehow hop into a ClojureScript context (which I never really understood). As far as I know with prepl that's not the way you'd handle it, you just start two prepl ports, one for CLJ and one for CLJS. Which Conjure is designed around.

Olical15:06:06

If you have an existing ClojureScript instance running, say, through figwheel. You can get the eval context and actually give that to the ClojureScript prepl server. This means you can basically attach a prepl server to any evaluation environment, I think.

Olical15:06:33

See here for a little example of plugging a prepl server into figwheel https://oli.me.uk/2019-03-22-clojure-socket-prepl-cookbook/#figwheel_and_prepl

Olical15:06:47

It worked really well for me 😄 I'd imagine the flow would be similar for shadow-cljs.

lilactown15:06:51

Funnily, I don’t really understand how one can have a prepl in CLJS 🤪 I should look into this soon

lilactown15:06:34

You’re still running the CLJS prepl server in the JVM process, right? Or is it somehow starting the repl in the JS process?

Olical15:06:09

It'll still require a Clojure JVM I think yeah. I haven't used it much other than making sure it works. As that post shows though, you can plug a prepl into some other eval environment, it doesn't need to start it but it can. So you can have it boot it's own node instance to run in or you can jack it into something that's already running. (such as figwheel / shadow)

dangercoder19:06:04

Does anyone use shadow-cljs and aws lambda? What libraries are you using?

tianshu20:06:50

looks like expo had a update on AppEntry.js.

stefan20:06:16

is there a beginner walkthrough for adding my own font files to a shadow-cljs project?