brandonbloom / fipp

Fast Idiomatic Pretty Printer for Clojure
525 stars 44 forks source link

Use of undeclared Var clojure.core.rrb-vector.rrbt/Transient #71

Closed chenyong closed 4 years ago

chenyong commented 4 years ago

Full logs:

yarn watch
yarn run v1.19.1
$ shadow-cljs watch client server
shadow-cljs - config: /Users/chen/repo/cirru/calcit-editor/shadow-cljs.edn  cli version: 2.8.67  node: v12.6.0
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - HTTP server available at http://localhost:7000
shadow-cljs - server version: 2.8.67 running at http://localhost:9630
shadow-cljs - nREPL server started on port 51221
shadow-cljs - watching build :client
shadow-cljs - watching build :server
[:client] Configuring build.
[:server] Configuring build.
[:server] Compiling ...
[:client] Compiling ...
[:server] Build completed. (124 files, 20 compiled, 1 warnings, 7.69s)

------ WARNING #1 - :undeclared-var --------------------------------------------
 Resource: clojure/core/rrb_vector/trees.cljs:8:33
--------------------------------------------------------------------------------
   5 |
   6 | (defn tail-offset [vec]
   7 |   (let [cnt (.-cnt vec)
   8 |         tail-len (if (instance? clojure.core.rrb-vector.rrbt/Transient vec)
---------------------------------------^----------------------------------------
 Use of undeclared Var clojure.core.rrb-vector.rrbt/Transient
--------------------------------------------------------------------------------
   9 |                    (.-tidx vec)
  10 |                    (alength (.-tail vec)))]
  11 |     (- cnt tail-len)))
  12 |
--------------------------------------------------------------------------------
[:client] Build completed. (238 files, 20 compiled, 1 warnings, 9.73s)

------ WARNING #1 - :undeclared-var --------------------------------------------
 Resource: clojure/core/rrb_vector/trees.cljs:8:33
--------------------------------------------------------------------------------
   5 |
   6 | (defn tail-offset [vec]
   7 |   (let [cnt (.-cnt vec)
   8 |         tail-len (if (instance? clojure.core.rrb-vector.rrbt/Transient vec)
---------------------------------------^----------------------------------------
 Use of undeclared Var clojure.core.rrb-vector.rrbt/Transient
--------------------------------------------------------------------------------
   9 |                    (.-tidx vec)
  10 |                    (alength (.-tail vec)))]
  11 |     (- cnt tail-len)))
  12 |
--------------------------------------------------------------------------------

I think it's highly related to https://github.com/brandonbloom/fipp/commit/2534620d5a942851e09679af6a6806eac1b8ad4e

Anything I should do on my side to upgrade the library?

jafingerhut commented 4 years ago

There is the same warning when working with that latest cljs version of the core.rrb-vector library alone. I created an issue for it here, but have not yet investigated how to fix it: https://clojure.atlassian.net/projects/CRRBV/issues/CRRBV-24

Except for the warning message during compilation, I have not seen it cause any functional problems. If you find that it does, please let me know.

jafingerhut commented 4 years ago

I have released version 0.1.1 of the core.rrb-vector library. The only change since the previous 0.1.0 release is to rearrange a little bit of code to fix the reason that the ClojureScript library was issuing this warning. Version 0.1.1 is available on Maven Central now, so you may upgrade this dependency version whenever you wish in fipp.

I am not aware of any functional bugs due to this warning. The code that causes the warning was exercised by the tests both in version 0.1.0 and 0.1.1, and the code executes as expected in both versions.

tiye commented 4 years ago

Thanks. No warnings when I add 0.1.1 locally.