Fork me on GitHub
#clojurescript
<
2020-05-08
>
ingesol12:05:03

Getting a bunch of things like this on latest cljs compiler and :bundle

WARNING: Wrong number of args (2) passed to cljs.core/merge at line 31 /Users/me/dev/path/to/ns.cljs
Using the following deps
{org.clojure/clojure          {:mvn/version "1.10.0"}
             org.clojure/clojurescript    {:git/url ""
                                           :sha     "419cd4b2f87e1e5557f5a1ed936fc1075bed9cd5"}}
Build goes through and app works

dnolen12:05:17

@ingesol that's in your code

dnolen12:05:34

so what's there?

ingesol12:05:44

@dnolen

(merge
             (get attr->props attr)
             {:type         type
              :placeholder  "Enter Text"
           
              :on-blur      on-blur
              :on-change    on-change})

ingesol12:05:05

Getting the same style of warnings for lots of core functions, like mapcat etc

ingesol12:05:36

So not a known issue it sounds. I thought it might be because I was using clojure 1.9.0, so upgraded, no difference

ingesol12:05:43

WARNING: Wrong number of args (3) passed to cljs.core/conj at line 28 /Users/inge/.gitlibs/libs/org.clojure/clojurescript/419cd4b2f87e1e5557f5a1ed936fc1075bed9cd5/src/main/cljs/clojure/set.cljs

ingesol12:05:19

WARNING: Wrong number of args (2) passed to cljs.core/merge at line 115 /Users/inge/.gitlibs/libs/org.clojure/clojurescript/419cd4b2f87e1e5557f5a1ed936fc1075bed9cd5/src/main/cljs/clojure/set.cljs

dnolen12:05:59

@ingesol I'm a bit skeptical since nothing happened between 1.10.758 and master that would cause this

dnolen12:05:34

if there is an issue I don't believe it related to the last release and master

ingesol12:05:35

I see. I don’t really have a minimal reproducible case either. So no idea? Could java version matter?

dnolen12:05:54

but I can say I'm using master and I don't see this problem

dnolen12:05:03

@ingesol it's possible your cache is somehow corrupted, you can delete ~/.cljs and ~/.gitlibs

dnolen12:05:49

also delete project/.cpcache

ingesol12:05:23

@dnolen Deleted all those, and old compiled js files, same result still

ingesol12:05:58

Also tried to use java 1.8 instead of 11

dnolen12:05:39

I don't see how JVM version could matter

dnolen12:05:09

this bug would occur if analysis was wrong somehow

ingesol12:05:10

agree, just throwing anything at the problem

dnolen12:05:01

nothing weird in your deps tree?

dnolen12:05:19

also it didn't sound like this was happening before so something changed

dnolen12:05:39

you also haven't stated precisely that 758 does work and master doesn't

ingesol12:05:26

yes, change was boot -> lein and switch to :target :bundle, and a bunch of steps during that. So I guess I will have to boil this down

dnolen12:05:51

but that's probably the problem right there

ingesol12:05:55

did not happen on lein before the change to :target :bundle

dnolen12:05:01

and I would stop looking at other stuff

dnolen12:05:09

the problem is likely the switch to lein

dnolen12:05:16

and using deps from lein

dnolen12:05:44

you're probably not getting the ClojureScript you think you are

ingesol12:05:58

@dnolen That seems to be correct, running it with clojure -A:cljs-prod seems to run without warnings

ingesol12:05:41

yes, but not 100% cool 🙂 I was hoping for this to work with lein->deps integration, but no disaster I guess.

ingesol13:05:44

@dnolen So just to confirm for anyone who’s interested: I was using https://github.com/RickMoynihan/lein-tools-deps with a git-based dep on clojurescript. The problem went away when I introduced this:

com.bhauman/figwheel-repl    {:mvn/version "0.2.0"
                                           :exclusions  [org.clojure/clojurescript]}
So seems the plugin is unable to detect a conflict between the git dep and the rest of the dependency tree generated for leiningen

ingesol13:05:51

Thanks for helping out!

Alex Miller (Clojure team)13:05:33

that plugin is now based on a pretty old version of tools.deps.alpha so could be missing lots of bug fixes too

👍 4
Jakub Holý (HolyJak)17:05:13

Is there anything like https://codepen.io/ that supports ClojureScript? Ie so that I could code and "run"/demonstrate a small Fulcro app online?

dazld17:05:09

jsbin allegedly has cljs support, but I couldn't get it going very well.

👍 4
Sanghyun Lee19:05:08

Hello, is there any way to avoid .. cannot be resolved for JS APIs when I use ClojureScript with Cursive

dnolen19:05:08

@hammerha I think Cursive would have to detect that pattern

dnolen19:05:25

might want to ask Colin in the #cursive channel

Sanghyun Lee19:05:55

didn’t know that there’s a cursive channel. Thanks @dnolen

jesse21:05:35

Just finished the initial version of a side-project’s simple frontend with re-frame, which is also my first ever time using Clojure(Script), and it’s been super nice

🎉 52