Fork me on GitHub
#cljs-dev
<
2017-11-20
>
zalky17:11:00

Hi all, checked in a number of other places first, wondering if this is a bug: seeing a lot of skipped compilation phases when compiling a super simple es6 js file using :foreign-libs with :es6 as :module-type. This is with 1.9.946 cljs.jar file. Here's a gist: https://gist.github.com/zalky/1c822ee6ad6499dc007718f9c72cf05c This produces a lot of warnings like:

WARNING: Skipping pass optimizeToEs6
factory features:  [block function, trailing comma, reserved words as properties .... etc...
Bug?

dnolen17:11:12

those are from Closure so unclear

anmonteiro18:11:06

@zalky sounds more like you have language-out :es6 than a problem with modules

zalky18:11:33

@anmonteiro: hmm, I have :language-in set, but not :language-out:

(cljs.build.api/build "src"
    {:main 'integrated.core
     :output-to "out/main.js"
     :language-in :es6
     :foreign-libs [{:file "src"
                     :module-type :es6}]
     :optimizations :advanced
     :verbose true})

anmonteiro18:11:30

you also don’t have any :provides but I don’t think that would matter

zalky18:11:00

the provides is explicit in the js file... would than not work?

anmonteiro18:11:08

then this is not a foreign lib

anmonteiro18:11:17

it doesn’t need to go through closure

anmonteiro18:11:53

:libs ["src"]

anmonteiro18:11:01

that’s all you need if you have a Closure compatible lib

zalky18:11:57

i see, i was originally using :libs, but then tried to get the es6 features to work via the clojurescript documentation here: https://clojurescript.org/reference/javascript-module-support

zalky18:11:36

seems like :libs produces the same result (doesn't work):

(cljs.build.api/build "src"
    {:main 'integrated.core
     :output-to "out/main.js"
     :language-in :es6
     :libs ["src"]
     :optimizations :advanced
     :verbose true})