Open thheller opened 4 months ago
It is also not great to use copy-file
and copying the same file onto itself, as that makes the whole build thing not repeatable.
@thheller Hi! First of all, thank you a lot for the Shadow CLJS! Your feedback is greatly appreciated. 🙏
I feel it makes the setup needlessly complicated. I would advise removing that build hook entirely and just instead directly call the function from here
Yes, I agree, will rework this part as you suggested.
It is also not great to use copy-file and copying the same file onto itself, as that makes the whole build thing not repeatable.
Makes sense. I didn't plan to use the build function outside the Docker image build, so overriding the same file wan't seemed to me a problem. It's reproducible at the Docker image level. But in general you are completely right and I'll think about improvements.
This might come over as nitpicky, but you really shouldn't be using shadow-cljs
:build-hooks
forhash-css
.A good indicator for when things should be a build hook is if they use
build-state
. You are not using it at all, so this absolutely should not be a hook. I feel it makes the setup needlessly complicated. I would advise removing that build hook entirely and just instead directly call the function from herehttps://github.com/abogoyavlensky/clojure-kamal-example/blob/8e1ae3673c550abd112479df17a578ebbb3bbdbf/build.clj#L28-L34
Heck, the whole
api.util.build
becomes obsolete if you just move the code intobuild.clj
. You could even remove thecopy-file
hook and just do that from withinbuild.clj
.