Hi Tim,

There is no `require` in ClojureScript; an `ns` form must be used with the desired `:require` specs included.

An incremental `require` form suitable for ClojureScript REPL-ing could be implemented as a macro, something that's been at the bottom of my TODO list for a while. Perhaps someone would like to take a shot at it; if it doesn't make it into ClojureScript itself, I'd be happy to wire it into Austin.

- Chas

On Sat 25 Jan 2014 06:49:08 PM EST, Timothy Washington wrote:
</>Hi all,

This seems like a dumb question, but here goes.


*A)* Using an austin repl <https://github.com/cemerick/austin>, I'm
having trouble pulling in my clojurescript namespaces (see here
<https://github.com/stefonweblog/stefon-compojure/blob/master/src/cljs/service/stefon_compojure.cljs>
and here
<https://github.com/stefonweblog/stefon-compojure/blob/master/test/cljs/service/stefon_compojure_test.cljs>).


    $ lein repl
    ...
    user=> *(cemerick.piggieback/cljs-repl :repl-env
    (cemerick.austin/exec-env))*
    Browser-REPL ready @ http://localhost:52650/2839/repl/start
    Type `:cljs/quit` to stop the ClojureScript REPL
    nil
    cljs.user=> *(require 'stefon-compojure.service) *
    "Error evaluating:" (require (quote stefon-compojure.service)) :as
    "cljs.user.require.call(null,new
    
cljs.core.Symbol(null,\"stefon-compojure.service\",\"stefon-compojure.service\",131448786,null));\n"
    #<TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')>
    TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')
        at :1
        at :5
    nil
    cljs.user=> *(require 'stefon-compojure.test) *
    "Error evaluating:" (require (quote stefon-compojure.test)) :as
    "cljs.user.require.call(null,new
    
cljs.core.Symbol(null,\"stefon-compojure.test\",\"stefon-compojure.test\",-1703011993,null));\n"
    #<TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')>
    TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')
        at :1
        at :5
    nil
    cljs.user=>



*B)* What makes me curious is that I'm getting a similar error when I
try to require the 'cemerick.austin.bcrepl-sample
<https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample>
example app namespace, bundled with austin. I've obviously done the
exact steps as laid out
<https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample#running-the-sample-app>
in that sample README. But that got me no further. This is obviously
the github version of austin (0.1.4-SNAPSHOT). What am I missing?

    austin/browser-connected-repl-sample$ lein repl
    ...
    cemerick.austin.bcrepl-sample=> *(run)*
    2014-01-22 06:43:18.486:INFO:oejs.Server:jetty-7.6.8.v20121106
    2014-01-22 06:43:18.521:INFO:oejs.AbstractConnector:Started
    [email protected]:8080
    <http://[email protected]:8080>
    #<Server org.eclipse.jetty.server.Server@3cf0e855>
    cemerick.austin.bcrepl-sample=> (cemerick.piggieback/cljs-repl
    :repl-env (cemerick.austin/exec-env))
    Browser-REPL ready @ http://localhost:47708/2262/repl/start
    Type `:cljs/quit` to stop the ClojureScript REPL
    nil
    cljs.user=> *(require 'cemerick.austin.bcrepl-sample)*
    WARNING: Use of undeclared Var cljs.user/require at line 1
    "Error evaluating:" (require (quote
    cemerick.austin.bcrepl-sample)) :as
    "cljs.user.require.call(null,new
    
cljs.core.Symbol(null,\"cemerick.austin.bcrepl-sample\",\"cemerick.austin.bcrepl-sample\",940569761,null));\n"
    #<TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')>
    TypeError: 'undefined' is not an object (evaluating
    'cljs.user.require.call')
        at :1
        at :6
    nil
    cljs.user=>



Thanks

Tim Washington
Interruptsoftware.com <http://interruptsoftware.com>

--
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.

--
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.

Reply via email to