Fork me on GitHub
#hoplon
<
2023-10-31
>
alandipert02:10:09

New ci automation is great, thanks Marcelo

🙌 1
mynomoto20:10:35

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]

👍 3
borkdude09:11:21

My opinion: I think it's worth splitting specs out to their separate namespaces

mynomoto11:11:02

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? :thinking_face:

borkdude11:11:08

You first have to call instrument

mynomoto11:11:22

Removing those was a simple way to see what would be the gains.

mynomoto11:11:49

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!

borkdude11:11:19

Having this function in the core namespace is especially alarming since it requires Clojure spec test which increases the bundle size even more :)

mynomoto11:11:11

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?

mynomoto11:11:31

Yeah, the difference is around 180k, most apps will not get to this size.

borkdude11:11:59

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

mynomoto11:11:13

Sure, I'm all for it. Thank you!