This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-31
Channels
- # bangalore-clj (3)
- # beginners (15)
- # boot (128)
- # cider (4)
- # cljs-dev (12)
- # cljsjs (1)
- # clojure (105)
- # clojure-austin (5)
- # clojure-canada (6)
- # clojure-italy (5)
- # clojure-russia (14)
- # clojure-spec (70)
- # clojure-uk (21)
- # clojurebridge (3)
- # clojurescript (264)
- # cloverage (6)
- # cursive (4)
- # data-science (6)
- # datomic (10)
- # dirac (5)
- # editors (30)
- # events (3)
- # hoplon (9)
- # klipse (7)
- # leiningen (3)
- # luminus (4)
- # off-topic (9)
- # om (5)
- # om-next (1)
- # onyx (1)
- # parinfer (2)
- # perun (28)
- # re-frame (5)
- # ring (1)
- # rum (11)
- # spacemacs (2)
- # specter (10)
- # sql (3)
- # uncomplicate (4)
- # untangled (67)
- # vim (2)
- # yada (1)
Specter looks really cool, but I can't figure out how to import it. How do I actually use the library in a namespace?
@kzeidler: (use 'com.rpl.specter)
?
I get: `Only :refer-clojure, :require, :require-macros, :use, :use-macros, and :import libspecs supported at line 1 src/succulent/core.cljs
What's the idiomatic way to put this in my code? Just place it after the ns definition?
Spoke too soon. It compiled with your suggestion, but isn't able to find a definition for any of its functions
And in the repl: (use 'com.rpl.specter)
clojure.lang.ExceptionInfo: Only [lib.ns :only (names)] and optionally :rename {from to}
specs supported in :use / :use-macros; offending spec: [com.rpl.specter] at line 1 <cljs repl> {:file "<cljs repl>", :line 1, :column 1, :root-source-info {:source-type :fragment, :source-form (ns succulent.core (:use [com.rpl.specter]))}, :tag :cljs/analysis-error}
@kzeidler in clojurescript you can't do use
, you have to do require
if you don't want the prefix in cljs you have to enumerate every symbol you want to import, e.g. (require '[com.rpl.specter :refer [ALL srange keypath]])