Fork me on GitHub
#hoplon
<
2017-08-22
>
thedavidmeister03:08:25

@flyboarder nice, did you push to clojars?

flyboarder03:08:50

@thedavidmeister probably not….. ill do it again anyway

flyboarder03:08:10

oh looks like I did

thedavidmeister03:08:18

i'll re-run my tests then 🙂

flyboarder03:08:18

also just finished the new website, entirely in Hoplon

thedavidmeister03:08:57

also, getting fails for this now

thedavidmeister03:08:59

(h/defelem section
 [{:keys [left
          right
          left-colour
          left-text-colour
          right-colour
          right-text-colour
          children
          padding
          id]}]

thedavidmeister03:08:04

i'll see if i can get a test up

thedavidmeister04:08:52

@flyboarder you definitely pushed to clojars?

thedavidmeister04:08:58

i'm struggling to reproduce this one a bit

thedavidmeister04:08:18

clojure.lang.ExceptionInfo: clojure.lang.ExceptionInfo: ERROR: Call to hoplon.core/elem did not conform to spec:
                                                                 In: [0] val: [{:keys [left right left-colour left-text-colour right-colour right-text-colour children padding id]}] fails spec: :hoplon.spec/attr-kids at: [:args :bindings] predicate: (= (count %) 2)
                                                                 :clojure.spec.alpha/args  ([{:keys [left right left-colour left-text-colour right-colour right-text-colour children padding id]}] (let [padding (or padding (u/px 70))] [(h/div :class "two-col-wrapper" :id id (h/div :class "lefty" :garden {:background-color left-colour, :color right-text-colour, :padding padding} left) (h/div :class "righty" :garden {:background-color right-colour, :color right-text-colour, :padding padding} (into children right)))]))

flyboarder04:08:22

@thedavidmeister gimme 2 minutes and I'll push again

thedavidmeister04:08:15

also, i think my section element is screwed up anyway

thedavidmeister04:08:24

i dunno why children is in keys lol

flyboarder04:08:49

Should be good now

thedavidmeister04:08:47

clojure.lang.ExceptionInfo: clojure.lang.ExceptionInfo: ERROR: Call to hoplon.core/for-tpl did not conform to spec:
                                                                 In: [0 0] val: [k label placeholder] fails spec: :hoplon.spec/binding-cell at: [:args :bindings 0] predicate: symbol?
                                                                 :clojure.spec.alpha/args  ([[k label placeholder] [[:item/title "Item name:" "Name this item…"] [:item/min "Minimum:" "Minimum"] [:item/max "Maximum:" "Maximum"] [:item/mode "Most likely:" "Most likely"]]] (form.hoplon/item-input :focus (j/cell= (and focus? show-fields? (= :item/title k))) :item-key k :item item :placeholder placeholder :input (fn* [p1__50291#] (item.api/user-input! conn (merge (clojure.core/deref item) {(clojure.core/deref k) (clojure.core/deref p1__50291#)})))))

thedavidmeister04:08:35

looks to be caused by me passing a sequence instead of a cell to for-tpl

flyboarder04:08:11

travis #325 should pass

thedavidmeister04:08:55

nah it won't because i made a bad test 😛

thedavidmeister04:08:23

any idea how to get java.io.NotSerializableException: clojure.spec.alpha$regex_spec_impl$reify__1200 to output the actual spec error?

flyboarder04:08:50

could It mean an issue with the spec itself?

thedavidmeister04:08:04

i dunno, it's just the output of the test that means something is failing a spec

thedavidmeister04:08:34

@flyboarder through trial and error i figured out that it's failing on

thedavidmeister04:08:37

(let [c (j/cell [1 2 3])
       el (h/div
           (h/for-tpl [t c]))]))

flyboarder04:08:12

WARNING: doo's init function was not set
#object[TypeError TypeError: undefined is not an object (evaluating 'hoplon.tpl_test._QMARK__QMARK_if_tpl')]

thedavidmeister04:08:03

just means you have an error... somewhere...

flyboarder04:08:15

lets see if this goes anywhere

thedavidmeister05:08:48

it did not like (map .-textContent ..)

thedavidmeister05:08:56

i had to wrap that in a fn

flyboarder05:08:33

our tests are slow, I added .m2 to travis cache

flyboarder05:08:57

pushed to clojars

thedavidmeister05:08:40

oh yeah good idea on the cache

thedavidmeister05:08:11

clojure.lang.ExceptionInfo: clojure.lang.ExceptionInfo: ERROR: Call to hoplon.core/for-tpl did not conform to spec:
                                                                 In: [0] val: [c (j/cell= (seq padded))] fails spec: :clojure.core.specs.alpha/local-name at: [:args :bindings :binding :sym] predicate: simple-symbol?
                                                                 In: [0 1] val: ((j/cell= (seq padded))) fails spec: :clojure.core.specs.alpha/seq-binding-form at: [:args :bindings :binding :seq] predicate: (cat :elems (* :clojure.core.specs.alpha/binding-form) :rest (? (cat :amp #{(quote &)} :form :clojure.core.specs.alpha/binding-form)) :as (? (cat :as #{:as} :sym :clojure.core.specs.alpha/local-name))),  Extra input
                                                                 In: [0 0] val: c fails spec: :clojure.core.specs.alpha/map-binding at: [:args :bindings :binding :map :mb] predicate: vector?

thedavidmeister05:08:24

i think vector? should be sequential?

thedavidmeister05:08:16

(let [c (j/cell [])
        el (h/div
            (h/for-tpl [v (j/cell= (seq c))]
             (h/div v)))])))

thedavidmeister05:08:59

@flyboarder ok, the issue seems to be when you seq something in for-tpl and end up with nil

dm306:08:57

@micha the code walking for Javelin JVM/Cljs cell hoisting is different, also the implementation of cells itself. Otherwise it all stays the same. I was having trouble with conditional compilation to cljs/self-host cljs but otherwise currently the thing works for me on the JVM and the tests pass on JVM/self-host.

dm306:08:25

Also the reified graph is pretty interesting. Now I’m using it in a way where each namespace gets a separate graph instance because I don’t need the cells between ns’es to interact. It needs more thought around cell lifecycle - creating/destroying cleanly so that the cells can be easily tested and destroyed without leaving garbage around.

flyboarder18:08:00

@thedavidmeister still working on this, not sure why it’s throwing that

flyboarder18:08:11

confirmed that is an issue with the spec itself

flyboarder18:08:00

Woot! bug squashed!