day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Warnings about fn-arity and undeclared var #285

Closed posobin closed 3 years ago

posobin commented 3 years ago

I am getting these warnings, have been getting since starting using re-frame-10x on a new project I think. I am using shadow-cljs.

------ WARNING #1 - :fn-arity --------------------------------------------------
 Resource: day8/re_frame_10x.cljs:34:28
--------------------------------------------------------------------------------
  31 |                                        {})
  32 |                           :operation (operation-name c)}
  33 |                          (if util/*non-reactive*
  34 |                            (reagent.impl.component/do-render c)
----------------------------------^---------------------------------------------
 Wrong number of args (1) passed to reagent.impl.component/do-render
--------------------------------------------------------------------------------
  35 |                            (let [rat        (gob/get c "cljsRatom")
  36 |                                  _          (batch/mark-rendered c)
  37 |                                  res        (if (nil? rat)
  38 |                                               (ratom/run-in-reaction #(reagent.impl.component/do-render c) c "cljsRatom"
--------------------------------------------------------------------------------

------ WARNING #2 - :fn-arity --------------------------------------------------
 Resource: day8/re_frame_10x.cljs:38:71
--------------------------------------------------------------------------------
  35 |                            (let [rat        (gob/get c "cljsRatom")
  36 |                                  _          (batch/mark-rendered c)
  37 |                                  res        (if (nil? rat)
  38 |                                               (ratom/run-in-reaction #(reagent.impl.component/do-render c) c "cljsRatom"
-----------------------------------------------------------------------------^--
 Wrong number of args (1) passed to reagent.impl.component/do-render
--------------------------------------------------------------------------------
  39 |                                                                      batch/queue-render reagent.impl.component/rat-opts)
  40 |                                               (._run rat false))
  41 |                                  cljs-ratom (gob/get c "cljsRatom")] ;; actually a reaction
  42 |                              (trace/merge-trace!
--------------------------------------------------------------------------------

------ WARNING #3 - :undeclared-var --------------------------------------------
 Resource: day8/re_frame_10x.cljs:68:11
--------------------------------------------------------------------------------
  65 |                                    :operation (last (str/split name #" > "))}
  66 |                                   (real-renderer c)))))
  67 | 
  68 |     (set! reagent.impl.component/static-fns static-fns)
-----------------^--------------------------------------------------------------
 Use of undeclared Var reagent.impl.component/static-fns
--------------------------------------------------------------------------------
  69 | 
  70 |     (set! reagent.impl.component/custom-wrapper
  71 |           (fn [key f]
  72 |             (case key
                     --------------------------------------------------------------------------------
mtnygard commented 3 years ago

Likewise.

My versions:

React          16.13.0
Reagent        1.0.0-alpha2
re-frame-10x   0.7.0

The versions table in README doesn't have the alphas of Reagent, so I suspect these versions don't entirely make sense together.

mtnygard commented 3 years ago

I just saw that Reagent 1.0.0-rc1 was pushed yesterday. It also has the warnings about the static-fns undeclared. (FWIW, the -rc1 version also introduces a version conflict in React!)

I'll try dropping back to Reagent 0.10.0 and see what happens.

EDIT:

Confirmed that dropping Reagent's dependency to 0.10.0 eliminates the warnings.

superstructor commented 3 years ago

Reagent 1.0.0 support has been fixed in re-frame-10x 1.0.0. README compatibility table has been updated.