Reloading question. if you have the following require chain: ui -> resolver -> transform and not ui -> transform directly and you made a change in transform, resolver would reload, but ui would not - does that make sense? I would perhaps expect that ui would also reload, although technically it shouldn't have to since when you re-define only one mutable namespace object, all the rest should see the differences when functions being called. but with that reasoning, resolver itself shouldn't have to reload either. so I'm kind of puzzled by this
the logic stops at resolver yes. with the reason being that you may make a change in transform, e.g. rename (defn foo [] ...) to (defn bar [] ...). if resolver was not recompiled but still using foo it would get runtime problem. when it does get recompile you at least get a compiler warning/error. ui doesn't have a require, so doesn't use anything from transform directly and thus doesn't need to be recompiled
(note that this behaviour is specific to shadow-cljs. figwheel does still do the entire chain I think)
note that when it comes to reloading you can set :devools {:reload-strategy :full}. that does reload the entire chain, but still doesn't recompile ui still
thanks for the explanation
note that not too long ago I slightly adjusted this logic to account for macro expanded code
so, if for any reason ui does actually use something from transform directly it will get recompiled
could be coming from a macro emitting a fully qualified symbol or just the code itself using something directly
so the direct require isn't the only "link"
https://github.com/thheller/shadow-cljs/commit/3da9880ca86666bbdb0e49b43034973789141c05 actually been much longer ago than I remembered. so been like that for a while now.