Fork me on GitHub

@sritchie09 what makes you think this is shadow-specific? this is a standard cljs compiler warning

Sam Ritchie18:02:28

Of course you're right. I bumped shadow and that bumped cljs too, plus tests hang in CI for an hour - off to debug!

Sam Ritchie18:02:54

Though it is a problem I guess in this case, since I am explicitly overriding + and don't need the validation anymore. Maybe if I exclude I can kill it

Sam Ritchie18:02:54

Vs just replacing the var


a quick look suggests that you are missing a :require-macros in this ns


so macros are only regcognized if this ns is loaded by other means, which may be unpredicatable


I'd assume the infix thing is a macro so for CLJS this needs a self-require (:require-macros [sicmutils.env])

Sam Ritchie18:02:23

Nope, just a function

Sam Ritchie18:02:54

The example is the same without the ->infix, that was just for printing a string

Sam Ritchie18:02:40

No macros at all in the example, just a function + from my namespace


ah ok. then I guess I don't get what the point of that is

Sam Ritchie18:02:55

Oh, it's an extensible + that is adding symbols in this case, but can do numbers, vectors, functions, and anything you extend it to

Sam Ritchie18:02:04

Imagine from clojure.algo.generic


all this potemkin import-vars stuff probably doesn't work for cljs

Sam Ritchie18:02:19

It totally does

Sam Ritchie18:02:45

It works great in the REPL usually and in all tests, etc and has for a year

Sam Ritchie18:02:56

And works in the example where I bind the + to f as an example

Sam Ritchie18:02:12

This is the reader making an incorrect assumption about what the symbol + means


last time I checked it was purely CLJ so I can't really see how it works?

Sam Ritchie18:02:46

The sicmutils library? All cljc

Sam Ritchie18:02:26

It seems like it is just a problem with the REPL launched like in my example , not shadow's test runner or the cider repl

Sam Ritchie18:02:55

I can prove it when I'm at a computer, I'll put this together for the cljs folks and see if this changed with the recent version or it's been this way


oh I didn't see the :refer. that was just about regular +

šŸ‘ 1

yeah that doesn't seem right


but fwiw potemkin import-def is absolutely not ideal for CLJS

Sam Ritchie18:02:33

Yup, I wrote my own lighter weight one for cljs vs using Potemkinā€¦ it doesn't pull any metadata over etc which is not ideal

Sam Ritchie18:02:38

Not ideal but works for now


did you try this with regular CLJS? as far as I can tell shadow-cljs is doing everything it is supposed to


hmm yeah I can reproduce this with just cljs.main


not sure what is happening


guessing something with the inference stuff around those functions


repro reported in #cljs-dev maybe someone has an idea. not sure if this is a known issue.

Sam Ritchie21:02:33

Thank you for the repro!


$ clj -M -m cljs.main
Failed to launch a browser:

No X11 DISPLAY variable was set,
but this program performed an operation which requires it.

You can instead launch a non-browser REPL (Node or Nashorn).

You can disable automatic browser launch with this REPL option
  :launch-browser false
and you can specify the listen IP address with this REPL option
  :host ""

Waiting for browser to connect to  ...
ClojureScript 1.10.866

(+ 'x 'x)
WARNING: cljs.core/+, all arguments must be numbers, got [cljs.core/Symbol cljs.core/Symbol] instead at line 1 <cljs repl>