Can you run this?
lein repl
(require 'pts.macros)
If not you are probably missing a classpath entry since macros have to be on
the classpath for Clojurescript (Clojure) to find them.
Your project should have
(defproject ...
:source-paths ["src/clj"]
:cljsbuild {:source-paths ["src/cljs"]})
HTH,
/thomas
On Saturday, January 3, 2015 12:27:56 AM UTC+1, Jonathon McKitrick wrote:
> I cannot figure out how to do this. I have a few simple macros I'd like to
> use in the clojurescript side of my project, but I'm constantly gettings
> errors like these:
>
> Compiling ClojureScript.
> Compiling "resources/public/js/main.js" from ["src/cljs"]...
> WARNING: No such namespace: pts.macros at line 14
> src/cljs/try-macros/try-macros.cljs
>
> When I have this in try-macros.cljs:
> (:require-macros [cljs.core.async.macros :refer [go]]
> [pts.macros :as m])
>
> Here's a snippet of my project structure:
>
> src/clj
> └── pts
> ├── core.clj
> ├── db.clj
> ├── import.clj
> ├── macros.clj
> ├── mailer.clj
> ├── reports.clj
> ├── server.clj
> └── util.clj
>
> src/cljs
> ├── common
> │ ├── common.cljs
> │ ├── roles.cljs
> │ └── talks.cljs
> ├── confirm
> │ └── confirm.cljs
> ├── history
> │ └── history.cljs
> ├── home
> │ └── home.cljs
> ├── incoming
> │ └── incoming.cljs
> ├── outgoing
> │ └── outgoing.cljs
> ├── outlines
> │ └── outlines.cljs
> ├── settings
> │ └── settings.cljs
> └── speakers
> └── speakers.cljs
>
>
> I've tried putting the macros.clj file in both the clj and the cljs
> subdirectories, but to no avail. The namespace of cljs files doesn't seem to
> have the same requirement as clj to reflect the path to the file, but I could
> be wrong on that.
>
> Thanks!
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.