shadow-cljs icon indicating copy to clipboard operation
shadow-cljs copied to clipboard

Weird circular dependency

Open JanSuran03 opened this issue 2 years ago • 3 comments

Am I doing something wrong or is this a bug?

image image

JanSuran03 avatar Jul 05 '22 22:07 JanSuran03

Restarting Shadow did help. I think I entered one of the namespaces via in-ns and required one of the others which created a circular dependency. But recompiling shadow didn't get rid of the circular dependency although it only has been done via REPL.

JanSuran03 avatar Jul 05 '22 22:07 JanSuran03

I mean, it's probably not a bug, it's just an edge case which it's hard to do something about. But you don't really want this to happen to you.

JanSuran03 avatar Jul 05 '22 22:07 JanSuran03

Yes, invoking stuff in the REPL may affect the build in unexpected ways. This one is particularly nasty since it sticks arround until you actually modify the file that had the require added or restart the build. Separating out REPL-sourced state and file-on-disk-state is kinda tricky so this is a somewhat known limitation.

thheller avatar Jul 06 '22 06:07 thheller