weavejester / hashp

A better "prn" for debugging
MIT License
439 stars 23 forks source link

Using hashp with shadow-cljs emits undeclared-var warnings #15

Open maxrothman opened 3 years ago

maxrothman commented 3 years ago

I set up hashp in my shadow-cljs project as per the README (slightly abbreviated):

{:source-paths
 ["src/dev"
  "src/main"
  "src/test"]

 :dependencies
 [[hashp "0.2.1"]]

 :builds
 {:frontend {:target :browser
             :modules {:main {:init-fn spell-list.main/init}}
             :devtools {:preloads [hashp.core]}}}}

When I start the dev build, I get 39 instances of the following warning:

------ WARNING #1 - :undeclared-var --------------------------------------------
 Resource: sci/impl/fns.cljc:141:28
 Use of undeclared Var sci.impl.fns/clojure
--------------------------------------------------------------------------------

Hashp still works regardless of those errors, but it might be something worth looking into?

viesti commented 2 years ago

Seems that bumping zprint to current latest (1.2.4) helped for me (sci dependency seems to come from zprint).

viesti commented 1 year ago

Also, when using clojure 1.11.1, there's a warning on zprint's use of it's own abs function, which is now in clojure.core:

WARNING: abs already refers to: #'clojure.core/abs in namespace: zprint.range, being replaced by: #'zprint.range/abs

I guess if users don't specify the Clojure version used, bumping zpint would land them to 1.11.1, but I guess the Clojure version should usually be specified in application projects.