Fork me on GitHub
#shadow-cljs
<
2019-02-10
>
sogaiu12:02:45

is there an easy way to turn off the nrepl server that starts up with shadow-cljs watch?

thheller12:02:08

why would you?

thheller12:02:26

no one ever asked for that so there is currently no option to do so

thheller12:02:33

would be easy to add though

sogaiu12:02:57

ah thanks -- not using nrepl, don't need it to be running -- less resource use, less open ports, etc.

thheller12:02:27

@sogaiu in [email protected] you can set :nrepl false and/or :socket-repl false to disable them

sogaiu12:02:50

sounds great! will give it a try

sogaiu12:02:49

@thheller adding :nrepl false to shadow-cljs.edn seems to work as expected in 2.7.31, thanks a lot πŸ™‚

dpsutton12:02:09

What is your workflow if you don't mind sharing. I'm just curious

sogaiu13:02:04

at least in the case of writing packages in cljs for atom or extensions for vscode, nrepl does not seem necessary

lilactown16:02:40

is there a way to inform shadow-cljs to pick up new versions of npm deps I installed?

thheller17:02:15

that should happen automatically? npm source files are watched once used

lilactown17:02:21

hm, I ran npm i to grab new React versions that were in my package.json and I had to restart the shadow-cljs process to get it to pick up

thheller10:02:43

should be fixed in 2.7.32

lilactown17:02:23

I tried shadow/stop-worker and re-running shadow/watch too, was still getting errors due to not being on latest React

thheller17:02:15

that doesn't do anything. the cache is shared between workers so restarting the worker won't restart the cache

thheller17:02:10

open an issue please. can't check right now but it is supposed to be working.

Mark Addleman18:02:49

The socket repl is not starting up. nRepl server starts and I get a log statement shadow-cljs - nREPL server started on port 9000. There is no corresponding statement for the socket repl. The relevant bits of my shadow-cljs.edn file are

:socket-repl {:port 9001}
 :nrepl  {:port 9000}

Mark Addleman18:02:15

At least, I think those are the relevant bits of the shadow-cljs config. I must be missing something πŸ™‚

thheller20:02:35

@mark340 did you try connecting to post 9001? it just isn't printed but it should be started

Mark Addleman21:02:19

So it is. The repl is started but no log output

hmaurer20:02:22

Really silly question but I have some css files in resources/ which are exposed by my web server and which I include in a page. Is there a way to get the page to live-reload when I change the css? (preserving everything; just updating the css)

hmaurer20:02:19

ah nevermind

hmaurer20:02:35

got my answer πŸ™‚

grav21:02:06

Anything to do about an error like this:

[:app] Build failure:
failed to convert sources
{:tag :shadow.build.closure/convert-error, :sources [[:shadow.build.npm/resource "node_modules/qr-scanner/qr-scanner.min.js"]]}
ExceptionInfo: failed to convert sources
  ...
Caused by:
RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Source map's "sources" and "sourcesContent" lengths do not match.
	com.google.javascript.jscomp.PrebuildAst.prebuild (PrebuildAst.java:79)
...

grav21:02:32

It is this npm package that’s the issue: https://github.com/nimiq/qr-scanner

thheller21:02:51

you can remove //# sourceMappingURL=qr-scanner.min.js.map from the node_modules/qr-scanner/qr-scanner.min.js file

thheller21:02:16

first time I've seen this error. guess clojure is really strict about incorrect source maps

grav21:02:22

Cool, will try that!

grav21:02:33

That did the trick. Thanks!

thheller21:02:45

> Lightweight: 33.7 kB (12 kB gzipped) minified with Google's closure compiler.

thheller21:02:19

thats not minified at all πŸ˜›

grav21:02:19

Isn’t whitespace_only a kind of minification?

thheller21:02:56

well yeah its removing whitespace ...

thheller21:02:22

doesn't matter much since shadow-cljs will minifiy it properly for you πŸ˜‰

grav21:02:44

which is pretty cool πŸ™‚

grav21:02:10

Btw awesome experience with using npms in general .. after the first error I just npm installed another qr-reader and required that one, without needing to restart, reload or anything. Can any js build pipeline do that?

thheller21:02:06

not a clue. I basically never used any JS tools in anger πŸ˜›

🀯 10
grav21:02:03

hehe πŸ™‚ so shadowcljs is out of anger? great anger management - hats off to you πŸ™‚

thheller21:02:00

had to get rid of my own frustrations when working with CLJS somehow πŸ˜‰