Fork me on GitHub
#shadow-cljs
<
2017-09-27
>
thheller09:09:13

I might have solved :externs by accident

thheller09:09:22

I did not expect the closure compiler to be this smart

thheller09:09:40

well not fully but this is working far better than I expected 😛

thheller09:09:05

please test [email protected] with as many JS dependencies as you can find 😉

thheller11:09:20

dammit … guess we still need :externs

bolasblack15:09:55

Hi @thheller, I got an error when I trying require core.async

The required namespace "cljs.core.async.macros" is not available, it was required by "notifier/core.cljs" {:tag :shadow.build.resolve/missing-ns, :stack [{:resource-id [:shadow.build.classpath/resource "notifier/core.cljs"], :deps #{[:shadow.build.classpath/resource "goog/base.js"] [:shadow.build.classpath/resource "cljs/core.cljs"]}}], :ns cljs.core.async.macros}
ExceptionInfo: The required namespace "cljs.core.async.macros" is not available, it was required by "notifier/core.cljs"
        clojure.core/ex-info (core.clj:4725)
        clojure.core/ex-info (core.clj:4725)
        shadow.build.resolve/resolve-symbol-require (resolve.clj:209)
It only exist when I want to require core.async, when I use [andare](https://github.com/mfikes/andare) (A fork of core.async ported for use with bootstrapped ClojureScript.), shadow-cljs works well, and notify me
duplicate resource cljs/core/async/impl/buffers.cljs on classpath, using jar:file:/Users/c4605/.m2/repository/org/clojure/co
re.async/0.3.443/core.async-0.3.443.jar!/cljs/core/async/impl/buffers.cljs over jar:file:/Users/c4605/.m2/repository/andare/andare
/0.7.0/andare-0.7.0.jar!/cljs/core/async/impl/buffers.cljs

bolasblack15:09:04

Seems this error caused by I'm using (:require [cljs.core.async.macros :refer-macros [...], when I switch to :require-macros, the compile passed

thheller17:09:59

why would you use andare? @bolasblack

bolasblack01:09:01

Because require core.async macro throw error, so I want to check out where the problem is...

bolasblack01:09:26

So I tried andare 😁

thheller17:09:27

always use (:require-macros [cljs.core.async.macros ...]), :require is not valid in this case