Welcome! Please see the About page for a little more info on how this works.

+1 vote
in ClojureScript by

I just broke our cljsbuild, and I'm curious if it's a bug or expected behavior.

We have an external JS file that defines a global object with a function: link.myfn(), and an externs file that describes it. We have a namespace that shares the prefix: link.theme. This works as expected during development. However, with advanced optimizations it fails, because our cljs output somehow defines an empty link object that effectively overwrites the one from the external library. If I exclude the externs and the external library, no empty object is created.

I've put up a repo that reproduces this, and explains the four cases I tried, where only one of them fail: https://github.com/cjohansen/cljsns

This seems like a bug to me, but could possibly be some compiler detail I don't know about. Does anyone know?

1 Answer

0 votes

Did you try to reproduce this with just Google Closure? It seems like it wouldn't be so hard to do.