specter

Latest version: 1.1.3
richiardiandrea 2021-03-01T23:49:46.012100Z

Hi there, does empty 's implementation currently work on records? I get:

Exception in thread "async-dispatch-6" java.lang.UnsupportedOperationException: Can't create empty: appserver.lib.transport.data.Envelope
	at appserver.lib.transport.data.Envelope.empty(data.clj:66)
	at clojure.core$empty.invokeStatic(core.clj:5247)
	at clojure.core$empty.invoke(core.clj:5241)
	at com.rpl.specter.navs$eval4989$fn__4990.invoke(navs.cljc:363)
	at com.rpl.specter.navs$eval4923$fn__4924$G__4912__4931.invoke(navs.cljc:222)
	at com.rpl.specter$reify__5662.transform_STAR_(specter.cljc:707)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter$fn__6212$fn$reify__6214.transform_STAR_(specter.cljc:1423)
	at com.rpl.specter.navs$if_transform.invokeStatic(navs.cljc:411)
	at com.rpl.specter.navs$if_transform.invoke(navs.cljc:410)
	at com.rpl.specter$fn__6185$fn$reify__6187.transform_STAR_(specter.cljc:1362)
	at com.rpl.specter.impl$cell_nav$reify__4213.transform_STAR_(impl.cljc:514)
	at com.rpl.specter.impl$combine_two_navs$reify__3927$fn__3933.invoke(impl.cljc:202)
	at com.rpl.specter$reify__5662$next_fn__5668.invoke(specter.cljc:698)
	at com.rpl.specter.navs$eval4967$fn__4968.invoke(navs.cljc:270)
	at com.rpl.specter.navs$eval4923$fn__4924$G__4912__4931.invoke(navs.cljc:222)
	at com.rpl.specter$reify__5662.transform_STAR_(specter.cljc:707)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter$fn__6212$fn$reify__6214.transform_STAR_(specter.cljc:1423)
	at com.rpl.specter.navs$if_transform.invokeStatic(navs.cljc:411)
	at com.rpl.specter.navs$if_transform.invoke(navs.cljc:410)
	at com.rpl.specter$fn__6185$fn$reify__6187.transform_STAR_(specter.cljc:1362)
	at com.rpl.specter.impl$cell_nav$reify__4213.transform_STAR_(impl.cljc:514)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter.impl$combine_two_navs$reify__3927.transform_STAR_(impl.cljc:200)
	at com.rpl.specter.impl$compiled_transform_STAR_.invokeStatic(impl.cljc:411)
	at com.rpl.specter.impl$compiled_transform_STAR_.invoke(impl.cljc:410)
Difficult to understand where the problem is coming from but I am using something like this for traversing
(def POST-ORDER-TREE-VALS
  (specter/recursive-path [] p
    (specter/cond-path
     map? (specter/continue-then-stay [specter/MAP-VALS p])
     sequential? [specter/ALL p]
     set? [specter/ALL p]
     specter/STAY)))

richiardiandrea 2021-03-01T23:52:28.012600Z

maybe that map? needs to become record? or something? Trying in the REPL