I've been writing some cljc files lately, and importing the clj/cljs 
versions of particular libraries is becoming somewhat difficult.

I usually have to do some complicated reader-conditionals like this:


(ns my-ns
    (:require #?(:clj [clojure.core.typed :as t :refer [ann defalias Int]]
                        :cljs [cljs.core.typed :as t :refer [Int]]))
    
    #?@( :cljs ( (:require-macros [cljs.core.typed :as t :refer [ann 
defalias]]))
              :clj ()))


When including cross-platform libraries, I am able to refer all necessary 
symbols in a :require clause for clj files, but I need to separate macros 
from other symbols with cljs files.

Is there an easier or more straightforward way to do this with cljc files?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to