Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate namespaces in .jar #10

Closed
MrEbbinghaus opened this issue Nov 9, 2019 · 2 comments
Closed

Duplicate namespaces in .jar #10

MrEbbinghaus opened this issue Nov 9, 2019 · 2 comments

Comments

@MrEbbinghaus
Copy link
Contributor

In the jar of hasch there is the folder: /private/js/out which contains duplicates of clojure, cljs, incognito and hasch namespaces. This results in a ton of warnings when compiling with shadow-cljs and (in my case) results in errors later on.

Looks like this:

[2019-11-08 15:11:49.949 - INFO] filename violation for ns incognito.base, got: private/js/out/incognito/base.cljc expected: incognito/base.cljs (or .cljc)
[2019-11-08 15:11:49.950 - INFO] filename violation for ns clojure.string, got: private/js/out/clojure/string.cljs expected: clojure/string.cljs (or .cljc)
[2019-11-08 15:11:49.955 - WARNING] provide conflict for #{hasch.platform} provided by private/js/out/hasch/platform.js and {"/hasch/platform.cljs" #{hasch.platform}}
[2019-11-08 15:11:49.956 - INFO] filename violation for ns cljs.reader, got: private/js/out/cljs/reader.cljs expected: cljs/reader.cljs (or .cljc)
[2019-11-08 15:11:49.957 - INFO] filename violation for ns cljs.test, got: private/js/out/cljs/test.cljs expected: cljs/test.cljs (or .cljc)
[2019-11-08 15:11:49.957 - INFO] filename violation for ns cljs.pprint, got: private/js/out/cljs/pprint.cljs expected: cljs/pprint.cljs (or .cljc)
[2019-11-08 15:11:49.957 - WARNING] provide conflict for #{hasch.core} provided by private/js/out/hasch/core.js and {"/hasch/core.cljc" #{hasch.core}}
[2019-11-08 15:11:49.958 - WARNING] provide conflict for #{hasch.benc} provided by private/js/out/hasch/benc.js and {"/hasch/benc.cljc" #{hasch.benc}}
[2019-11-08 15:11:49.962 - WARNING] provide conflict for #{incognito.base} provided by incognito/base.cljc and {"/private/js/out/incognito/base.js" #{incognito.base}}
[2019-11-08 15:11:50.273 - WARNING] provide conflict for #{cljs.reader} provided by cljs/reader.cljs and {"/private/js/out/cljs/reader.js" #{cljs.reader}}
[2019-11-08 15:11:50.273 - WARNING] provide conflict for #{cljs.pprint} provided by cljs/pprint.cljs and {"/private/js/out/cljs/pprint.js" #{cljs.pprint}}
[2019-11-08 15:11:50.274 - WARNING] provide conflict for #{cljs.pprint} provided by cljs/pprint.cljc and {"/private/js/out/cljs/pprint.js" #{cljs.pprint}}
[2019-11-08 15:11:50.275 - WARNING] provide conflict for #{cljs.test} provided by cljs/test.cljs and {"/private/js/out/cljs/test.js" #{cljs.test}}
[2019-11-08 15:11:50.276 - WARNING] provide conflict for #{clojure.string} provided by clojure/string.cljs and {"/private/js/out/clojure/string.js" #{clojure.string}}
[2019-11-08 15:11:50.277 - WARNING] provide conflict for #{cljs.test} provided by cljs/test.cljc and {"/private/js/out/cljs/test.js" #{cljs.test}}

and later

HeadlessChrome 78.0.3904 (Mac OS X 10.15.1) ERROR
  TypeError: cljs.test.report is not a function
      at ci.js:177298:11
      at Object.cljs$test$run_block [as run_block] (ci.js:148721:19)
      at Function.cljs$core$IFn$_invoke$arity$2 (ci.js:177336:18)
      at shadow$test$run_tests (ci.js:177318:30)
      at Function.cljs$core$IFn$_invoke$arity$2 (ci.js:177377:30)
      at shadow$test$run_all_tests (ci.js:177359:34)
      at Function.cljs$core$IFn$_invoke$arity$1 (ci.js:177373:34)
      at shadow$test$run_all_tests (ci.js:177355:34)
      at shadow$test$karma$start (ci.js:183088:34)
      at shadow$test$karma$init (ci.js:183094:32)
HeadlessChrome 78.0.3904 (Mac OS X 10.15.1): Executed 1 of 1 ERROR (0.027 secs / 0.004 secs)
@whilo
Copy link
Member

whilo commented Nov 11, 2019

I have removed them manually in 0.3.7. I need to bump some deps in the near future, but I got blocked with my current attempt by cognitect/transit-java#31. If you hit other issues, please open another ticket.

@whilo whilo closed this as completed Nov 11, 2019
@kommen
Copy link

kommen commented Mar 29, 2020

FYI, ran into this as well building an ueberjar using seancorfield/depstar, which emitted a whole load of clashing jar item warnings, e.g:

{:warning "clashing jar item", :path "public/js/out/cljs/pprint.cljs.cache.edn", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/reader.cljs.cache.edn", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/pprint.cljs", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/repl.cljs.cache.edn", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/repl.js", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/core.js", :strategy :noop}
{:warning "clashing jar item", :path "public/js/out/cljs/pprint.js.map", :strategy :noop}

Manually bumping hasch to 0.3.7 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants