Fork me on GitHub
#shadow-cljs
<
2018-10-28
>
lassemaatta08:10:47

Hi. I've noticed that our build produces a lot of warnings regarding provide conflicts and filename violations. This doesn't seem to cause any actual problems, but I don't like seeings warnings. Any idea what might be the cause of this?

lassemaatta08:10:00

[2018-10-28 09:54:53.504 - WARNING] provide conflict for #{clojure.string} provided by out/clojure/string.js and {"/clojure/string.cljs" #{clojure.string}}
[2018-10-28 09:54:53.504 - INFO] filename violation for ns vimsical.re-frame.fx.track, got: out/vimsical/re_frame/fx/track.cljc expected: vimsical/re_frame/fx/track.cljs (or .cljc)

lassemaatta08:10:10

Our dependencies are declared in project.clj, therefore we use :lein true

lassemaatta08:10:33

Our configuration for the :app build looks basically like this

lassemaatta08:10:35

:builds {:app               {:target :browser}
          :module-hash-names true
          :output-dir        "resources/public/js/compiled"
          :asset-path        "/js/compiled"
          :module-loader     true
          :modules           {:common {:entries [foobar.main]}
                              ..      a few other modules..}
          :devtools          {:http-port    4000
                              :http-root    "resources/public"
                              :http-handler shadow.http.push-state/handle
                              :before-load  foobar.main/before-load
                              :after-load   foobar.main.main/after-load
                              :preloads     [dev.preloads]
                              :loader-mode  :eval}
          :js-options        {:resolve {"object.assign" {:target :npm :require "object-assign"}}}
          :dev               {:compiler-options {:optimizations   :none
                                                 :closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}}}
          :release           {:compiler-options {:optimizations :advanced}}}

thheller08:10:04

@lasse.maatta out seems to be on the classpath?

thheller08:10:15

so its either in your :source-paths or :resource-paths?

thheller08:10:22

the sources also seem to get copied there which is bad

lassemaatta08:10:00

yeah, our project.clj says :resource-paths ["resources"]

lassemaatta08:10:41

hmm. undefining or pointing the :resource-paths elsewhere doesn't seem to affect the warnings.

lassemaatta08:10:29

also, I can't find any reference to out in our source or configuration. Is it some internal shadow-cljs thing?

Jon09:10:54

anything I can do except for turning inference off?

thheller11:10:26

@lasse.maatta no shadow-cljs does not use any out directory. maybe its leftovers from cljsbuild or so?

thheller11:10:12

@jiyinyiyong yes, typehint correctly. you cann remove all ^js you currently have since they are all incorrect

thheller11:10:22

only ^js this is required

Jon11:10:49

Oh. it works. So the warning is pointing at the wrong position.

ClashTheBunny13:10:12

Is this just me?

ClashTheBunny13:10:07

I didn't even have ClojureScript in my deps.edn, so I don't know what version I was using beforehand.

ClashTheBunny13:10:39

I tried because of this:

thheller15:10:10

@clashthebunny not sure. I'll check master tommorrow. didn't see any breaking changes but maybe I missed something

🆒 4