Weird problem with templates, snippets and cljsbuild auto?

33 views
Skip to first unread message

Julio Barros

unread,
May 5, 2013, 3:10:29 PM5/5/13
to enf...@googlegroups.com
Hi,

I'm experimenting with templates and snippets and can't seem to get them to work reliably at all (with cljsbuild auto).

What seems to be happening is that I get a very simple template working and make a minor change (such as changing a selector) and I start getting a javascript error in the console.  Changing the selector back to the original still gives me the error, then doing a cljsbuild clean and once and the app starts working again.  It even works with the second selector.

The error I get is: TypeError: 'null' is not an object (evaluating 'child.nodeType')

It may be working better with cljsbuild once but I have not tested that throughly and would prefer to use auto if possible.

Does this sound familiar to anyone?  Is a version issue or some kind of caching problem?

Thanks.

Julio




Just for completeness this are fragments of what I am doing and I'm using whitespace optimization.

; Works fine
(defn foo []
  (ef/at js/document
         ["div"] (ef/content (template1 "WTF"))))

; change breaks
(defn foo []
  (ef/at js/document
         ["#rz-demo"] (ef/content (template1 "WTF"))))

; after clean and build works

Creighton Kirkendall

unread,
May 5, 2013, 3:24:01 PM5/5/13
to enf...@googlegroups.com

This may be due to a recent optimization I put in. I will take a look later today, my guess my snippet cache is still in memory and causing issues on the next run.

CK

--
 
---
You received this message because you are subscribed to the Google Groups "Enfocus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enfocus+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

ckirkendall

unread,
May 5, 2013, 8:04:46 PM5/5/13
to enf...@googlegroups.com
I fix the issue but unfortunately it required disability much of the optimizations on compile time snippets.  I have submitted a bug report to lien-cljsbuild and will submit a pull request later this week to fix the issues.   I pushed a new snapshot up and everything should work now.

CK

Julio Barros

unread,
May 6, 2013, 4:30:52 PM5/6/13
to enf...@googlegroups.com
Awesome.  Thank you.

Julio

Reply all
Reply to author
Forward
0 new messages