This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-11
Channels
- # announcements (3)
- # babashka (6)
- # babashka-sci-dev (37)
- # beginners (39)
- # calva (1)
- # clj-kondo (55)
- # clj-on-windows (1)
- # cljdoc (1)
- # clojure (30)
- # clojure-dev (3)
- # clojure-europe (8)
- # clojure-losangeles (1)
- # clojure-morsels (1)
- # clojurescript (26)
- # conjure (8)
- # graalvm (5)
- # helix (6)
- # hyperfiddle (12)
- # meander (6)
- # minecraft (1)
- # pathom (17)
- # polylith (1)
- # releases (2)
- # shadow-cljs (2)
- # sql (1)
- # squint (4)
I'm trying out pathom3 on the front end using CLJS. works great! I noticed that my bundle is including expound. for a simple app, it's actually quite a bit of code. is there a way that we could elide it in production?
hmm I also see transit-js in there which my app doesn't use. seems to be pulled in by pathom according to clj -Stree
hello @lilactown, yeah, expound is because of guardrails, but I understand the concern, I'll see what I can do to get that out, transit is there, but just to give the user the data types mapping, if you don't use it should be removed in advanced compilation, I'll have a look on that too
I wouldn't spend too much time on transit, I opened an issue on lambdaisland's lib https://github.com/lambdaisland/fetch/issues/20
confirmed that without that lib, transit-js isn't in my bundle - i.e. pathom doesn't include it 🙂
does guardrails really save a lot of headache while developing pathom? I've never used it
I like it, a got a couple bugs that were clearer to identify due to the guardrails checks, I also like that when I read a function declared with it, I can nav though the specs if I forget what a data type is expected to be
also minor, but the >def
to define a spec accepts a docstring (which goes nowhere, but good to read with the code), for example:
(>def ::choose-path
"A function to determine which path to take when picking a path for a OR node."
fn?)
I'd also like to remove the dependency on clojure.spec.alpha, as that also is about 8% of the bundle size
kind of, but maybe due to guardrails it might be possible to get shaved out
I'm working on a fork of guardrails, that will just do nothing related to specs, so it may be able to just avoid outputting anything, so advanced compilation might be able to shave it out
If you can remove guardrails, it may be easier to make Pathom work on other environments, like Clojerl, ClojureDart, and maybe even Cherry... That could be quite interesting
there is some places where its used by the library, but those are in the macros, so they dont need to be out I think, not sure
If you can remove guardrails, it may be easier to make Pathom work on other environments, like Clojerl, ClojureDart, and maybe even Cherry... That could be quite interesting