News for hackers. Stuff that matters.
Re:JavaScript Modularity Shaming by city41 on Wednesday January 07, 2015 @11:22PM (#8854979)
I did not know about :pseudo-names, that looks to be quite helpful. Thanks.

This is the method I was dealing with: https://github.com/city41/bookends/blob/master/site/src/cljs...

In that let expression I'm digging my way down into a native JS object to monkey patch it. The equivalent (set! (.. knex -client -Runner -prototype -debug) ...) was being completely removed as far as I can tell. Same with an equivalent aset. That channel no longer got set up and my app stopped working. If I simply put that method back to set!, then it breaks again, very reproducible. When I added in a (.log js/console "hello") to the method, I could see that console log inlined where the method call was, but no other remnant of the method could be found.

I will play with :pretty-print and look into creating a small repro of what I'm seeing. But if I don't succeed with a smaller repro, then at the very least this app is already quite small.

EDIT: here is a little gist showing the difference I'm seeing if anyone is curious: https://gist.github.com/city41/12099b91e0fbb526b0dc

Re:JavaScript Modularity Shaming by swannodette on Thursday January 08, 2015 @07:56AM (#8856152)
Yes this code is exactly the problem I described above - you are not supplying the required Closure externs file for Knex.
Re:JavaScript Modularity Shaming by city41 on Thursday January 08, 2015 @10:08AM (#8856668)
Ok, thanks for the help. I still can't seem to give it an externs file that makes the compiler happy. But I'll look into it on my own.