New ci automation is great, thanks Marcelo
I have a wip branch that removes spec from the clojurescript side of hoplon as suggested by @borkdude. I generated build reports of the counter demo with spec/no-spec, jquery/goog. Results: • goog/spec: [JS: 357.06 KB] [GZIP: 83.02 KB] • goog/no-spec: [JS: 183.19 KB] [GZIP: 41.37 KB] • jquery/spec: [JS: 439.95 KB] [GZIP: 111.75 KB] • jquery/no-spec: [JS: 264.21 KB] [GZIP: 69.66 KB]
My opinion: I think it's worth splitting specs out to their separate namespaces
I tried to remember seeing spec errors and tried to get those passing invalid arguments to spec'ed functions but I could not get it. I would be willing to move those to someplace else if we were getting some value from it but I'm not seeing this. What am I missing? 🤔
You first have to call instrument
Removing those was a simple way to see what would be the gains.
Oh, I thought there was a call to it but actually there is a function to instrument: https://github.com/hoplon/hoplon/blob/master/src/hoplon/core.cljs#L219-L222 I will try again later, thanks!
Having this function in the core namespace is especially alarming since it requires Clojure spec test which increases the bundle size even more :)
If I move the specs to a separated namespace is there a way to setup a project to use it only during development or people need to add the spec namespace when they want to instrument and remove it later?
Yeah, the difference is around 180k, most apps will not get to this size.
There is no way to dynamically do this in CLJS but imo you should at least give people the choice to NOT include this in your bundle size
Sure, I'm all for it. Thank you!