-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error from CLJS: Attempting to call unbound fn: #'hashp.core/p* #9
Comments
Can you provide some information about your setup? How are you "importing" |
I usually use figwheel, but in this case I am just compiling my source with All I did was include the No luck with either. For the latter, I get these warnings at compile time.
And running a function with |
You'll need to provide a little more information. I've just tried out the following file: (ns hello-world.core
(:require [hashp.core :include-macros true]))
(defn foo []
#p "Hello World") With the following deps.edn: {:deps {org.clojure/clojurescript {:mvn/version "1.10.758"}
hashp {:mvn/version "0.2.0"}}} And the following command: clj --main cljs.main --compile hello-world.core --repl And it works fine. If it's failing for you, can you give me some way of reproducing what you're seeing? |
Ok, this works perfectly when I add I guess I didn't realize the alternative is that I have to add both It would be great if I could use Is this just a current limitation? |
If you use ShadowCLJS and follow the instructions on the README, it's injected automatically. I don't know if Figwheel has the same, but I'm pretty sure that the basic CLJS compiler from tools.deps doesn't. |
Got it. Figwheel does have a preloads option. But sticking in Anyways thank you for the help. And thank you for creating this. :) |
Made a few attempts at getting preloads working in non-shadow-cljs builds, no luck so far. Making a separate preloads file that does I'm interested in finding a solution for this, as having a global "invisible" require makes hashp a much more attractive option. |
@harishtella @ingesolvoll I appear to mostly have this working with Figwheel.main if you add Here is relevant part of my dev profile in project.clj: :profiles {:dev {:dependencies [[hashp "0.2.1"]
[com.bhauman/figwheel-main "0.2.14"]
[com.bhauman/rebel-readline-cljs "0.1.4"]]
:source-paths ["src_server" "env/dev"]}} if you add a |
I'm not sure what I'm doing wrong, but I am working on CLI tools based CLJS project.
I have added
hashp {:mvn/version "0.2.0"}}
to mydeps.edn
I imported
[hashp.core]
to my namespace.And I tried adding
#p
to a form.I get the following compile time error
Attempting to call unbound fn: #'hashp.core/p*
.I looked at the source for
hashp/core.cljs
and it looks likep*
is not defined in there, but I'm likely misunderstanding how hashp works.The text was updated successfully, but these errors were encountered: