Fork me on GitHub
#shadow-cljs
<
2022-02-03
>
tianshu16:02:27

@thheller I ran into the error I talked before, that I have to delete .shadow-cljs to make it works again. I have the error stack, I'm not sure whether it will help or not, the build target is node-script.

thheller16:02:02

god damn slack. where is the download button for this?

tianshu16:02:46

Click the three dots, then View file details?

thheller16:02:17

just wanted to download a .txt file or something 😛

thheller16:02:23

guess I'll copy and paste

tianshu16:02:30

I'll upload a file

thheller16:02:10

hmm yeah can't make much of that either. dunno why it would be looking for something $cljs.

thheller16:02:15

this is actually node right?

tianshu16:02:26

Yes, it's node.

thheller16:02:09

and just restarting shadow-cljs was not enough?

tianshu16:02:40

yes, restarting is not enough. I'm sure the process is stopped

tianshu16:02:12

when it happens, there will be some random compile error, usually occurs to somewhere unchanged

thheller16:02:29

that usually points to 2 shadow-cljs versions running competing with each other

tianshu16:02:43

oh, two versions of shadow-cljs?

thheller16:02:03

well not versions. instances. like launching shadow-cljs twice in the same project

tianshu16:02:03

you mean in the same project?

thheller16:02:21

both compiling at the same time and overwriting each others files

tianshu16:02:23

the "instance" is the one I start with npx shadow-cljs ... ?

tianshu16:02:36

or some internal process?

thheller16:02:58

don't know how you are running things

thheller16:02:10

npx shadow-cljs watch app and emacs cider jack-in or something

thheller16:02:24

two separate jvm instances created somehow

thheller16:02:12

I guess just twice npx shadow-cljs watch app would cause this two if executed fast enough. meaning before one becomes "ready" and thus the second thinking it was first and starting as normal

tianshu16:02:52

I use cider, and cider use npx shadow-cljs server. But I don't think I started it twice.

tianshu16:02:20

will it matter if I have a test build?

thheller16:02:45

only if that instance also starts compiling the app build as well

thheller16:02:04

I typically recommend running npx shadow-cljs server manually yourself

thheller16:02:20

and then use cider connect instead of the jack-in stuff

thheller16:02:45

but I don't use cider so no clue if that is actually possible 😛

tianshu16:02:10

For the code files required in both builds(app, test). There will be only 1 version of cache in .shadow-cljs?

tianshu16:02:24

Okay, since more information is required. Probably I can figure how to reproduce for the next time.

thheller16:02:48

there will be one .shadow-cljs/builds/app/... and one .shadow-cljs/builds/test/...

thheller16:02:15

but if you have two processes compiling the app build they will both write to .shadow-cljs/builds/app/...

thheller16:02:34

there is only supposed to be one process compiling a build not two

thheller16:02:48

the next time this happens don't do anything. leave everything running. type jps. that should list all running java processes

thheller16:02:47

you can get further details on what these processes actually are via jinfo <pid> from jps

thheller16:02:26

or use something like jvisualvm. listing all jvm processses. or just ps I guess if you are on a mac/linux

tianshu16:02:02

I'll confirm whether there are more than one shadow instance

👍 1
tianshu16:02:55

BTW, is there a change log for shadow-cljs?