This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-09
Channels
- # admin-announcements (1)
- # beginners (78)
- # boot (36)
- # cider (13)
- # cljs-dev (15)
- # cljsjs (3)
- # cljsrn (10)
- # clojure (99)
- # clojure-austin (1)
- # clojure-australia (1)
- # clojure-italy (14)
- # clojure-korea (17)
- # clojure-norway (1)
- # clojure-russia (42)
- # clojure-sg (1)
- # clojure-spec (50)
- # clojure-uk (80)
- # clojurebridge (24)
- # clojurescript (83)
- # community-development (10)
- # conf-proposals (36)
- # core-async (12)
- # cursive (20)
- # datomic (38)
- # hoplon (63)
- # lambdaisland (2)
- # leiningen (6)
- # nyc (2)
- # om (54)
- # om-next (52)
- # onyx (129)
- # planck (15)
- # re-frame (38)
- # reagent (2)
- # rethinkdb (8)
- # specter (1)
- # untangled (2)
Hi all! I’m trying to get a planck repl working with cursive, I’d like to be able to send code from a cljs namespace in my project to the repl. I feel like I must be missing something pretty simple I can get the cursive repl to connect to planck, and send basic cljs forms to the repl and have them evaluated in the planck repl. However, when I try to require a library in the cljs namespace (e.g. "(ns guestbook.core (:require [reagent.core :as reagent :refer [atom]]))” , I get a “no such namespace error...”. I am starting planck with the -c option: “planck -c src -n 7777”. My directory structure is src clj <project-name> cljc cljs <project-name> core.cljs If you need more info, I’ll post a gist later, but I’m hoping I’m just missing something obvious 🙂
I should have mentioned, when I do lein cljsbuild.. , the same cljs source files compile fine, so I think the dependencies are actually in the project
also, I’m using the instructions here: http://planck-repl.org/ides.html
@ghufran I’d suggest trying it outside of Cursive first, but that doesn’t seem to be a problem. I’m wondering if Reagent works at all in self-hosted ClojureScript, and if the problem is related to that. What is the specific error you get?
ok, so I managed to get planck (outside of cursive) working with a source directory using the instructions at http://planck-repl.org/source-dev.html . I can define a function ‘hello’ in a namespace (‘guestbook.core’), then (require ‘guestbook.core) in planck and then call the function. However, if there are (:require ) forms in the namespace declaration in guestbook.core,then I get an error in planck:
guestbook.core=> (require 'guestbook.core :reload) foo nil guestbook.core=> (hello "foo") "Hello, foo” ;; then added (:require [datascript.core :as ds]) to the guestbook.core namespace declaration. Then when I try it again, I get the following: (require 'guestbook.core) No such namespace: datascript.core, could not locate datascript/core.cljs, datascript/core.cljc, or Closure namespace “datascript.core" (require 'guestbook.core :reload) No such namespace: datascript.core, could not locate datascript/core.cljs, datascript/core.cljc, or Closure namespace "datascript.core" nil cljs.user=>
I guess I implicitly expected that planck would be able to magically find it as long as it was in the project.clj and I had called lein deps… 🙂
Planck will indeed honor whatever classpath you pass to it, so it is probably worth taking a peek at that