Fork me on GitHub
#shadow-cljs
<
2020-05-22
>
frankitox00:05:52

Hi! I'm trying to set up shadow-cljs to use a REPL with iced-vim. I had to add https://liquidz.github.io/vim-iced/vim-iced.html#vim-iced-manual-shadow-cljs settings to my shadow-cljs.edn file and it worked. Then I thought about moving that settings to .nrepl.edn or ~/.nrepl/nrepl.edn. But it's not picking up the changes. I feel like I'm missing something here. I'm using :react-native as target.

frankitox00:05:31

For now I'll leave the :nrepl part of the settings on shadow-cljs.edn and move the :dependencies to deps.edn . But if somebody thinks otherwise do let me know!

thheller07:05:08

I don't know what dependencies have to do with nrepl but .nrepl.edn should be picked up

thheller07:05:19

just need to make sure you restart shadow-cljs after making changes

👍 4
kirill.salykin09:05:58

Hi, with latest changes to clojurescript (https://clojurescript.org/guides/webpack) npm integration becomes better and better. thus there is a question - what is the difference in handling npm dependencies between shadow-cljs and clojurescript? is shadow-cljs mostly just a code reloader via websocket (and sane compiler settings)? why would I prefer shadow-cljs over clojurescript (and vice verse)? sorry if i am asking stupid things, just trying to understand how things are connected thanks!

Vishal Gautam12:05:34

code reloading, build your files based on target (e.g browser, node etc), code splitting, npm integration, sane project configuration settings

Chris McCormick06:05:22

great summary thanks for this. 👍

thheller09:05:13

code-reloading is maybe 5% of what shadow-cljs does so you get a lot more than that 😛

Aron16:05:27

I did a release build and it's heavy. Although not too much, but out of curiosity, is there a way to look into these visually and see what is being included?

Aron00:05:20

very nice, thanks

steveb8n00:05:32

no probs. it’s a little out of date but I just tested it on my app and it works. there’s no longer a release-snapshot fn in shadow. the build-report fn will generate the snapshot data

steveb8n00:05:43

and you’ll need > 1 snapshot to see the toggles on the left hand side. just rename the “latest” one and re-gen (or copy “latest” with another name).

steveb8n00:05:35

sorry about the extra steps. I haven’t looked at it in a while. but now I’m learning about my new apps bundle 🙂

Aron16:05:00

I wish I could remember what I see

Vishal Gautam17:05:27

how do i specify nrepl port for each target build. I tried looking at the docs but couldnt anything

dpsutton17:05:51

i think only one nprel port?

dpsutton17:05:21

its just a single nrepl port. but you connect and call (shadow/nrepl-select :app) and that's how you specify which build for each repl

lilactown17:05:29

yeah, there should only be one nREPL port. you can connect multiple times and have multiple REPLs

isak17:05:11

Any problems with using :^const for constants that will not change in a live-reload context, so that they can be used with case, like (case x my-const ...)?

thheller19:05:35

@isak ^:const had issues in a couple releases. should be fixed in 2.9.8. also don't use ^:const 😛

isak19:05:47

@thheller ok, cool. What is the problem with it? The benefit is the (case) thing

thheller19:05:20

case is exactly the problem. it works differently in clojure.

isak19:05:35

Ah, ok, sounds like a good reason to avoid, thanks

Brandon Olivier23:05:27

I'm trying to introduce a shadow-cljs project at work. Is it possible to get the tree shaking provided by webpack when I use an npm lib? (it's a lib we own, specifically a component lib)

Lucy Wang01:05:57

I wonder why not use google closure compiler's more advanced optimization instead?