hoplon

2023-10-31T02:25:09.510989Z

New ci automation is great, thanks Marcelo

🙌 1
2023-10-31T20:10:35.093299Z

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
borkdude 2023-11-01T09:46:21.214239Z

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

2023-11-01T11:18:02.783919Z

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? 🤔

borkdude 2023-11-01T11:19:08.487819Z

You first have to call instrument

2023-11-01T11:19:22.927339Z

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

2023-11-01T11:21:49.652219Z

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!

borkdude 2023-11-01T11:24:19.739749Z

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

2023-11-01T11:25:11.806119Z

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?

2023-11-01T11:26:31.988409Z

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

borkdude 2023-11-01T11:26:59.116559Z

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

2023-11-01T11:28:13.228189Z

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