Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't require a namespace from the repl #36

Open
magomimmo opened this issue Nov 18, 2015 · 1 comment · May be fixed by #40
Open

can't require a namespace from the repl #36

magomimmo opened this issue Nov 18, 2015 · 1 comment · May be fixed by #40

Comments

@magomimmo
Copy link

It seems that if I do not first require a namespace of a lib in a requirement expression of a another namespace declaration written in cljs source file, the repl, even if see the public symbols of the required namespace, is not able to use the.

e.g.

;;; build.boot
(set-env!
 ...
 :dependencies '[...
                          [domina "1.0.3"]
                         ])
...

Then after having launched a bREPL.

cljs.user=> (require '[domina :as dom] :reload
                                '[domina.events :as evt] :reload)
nil
cljs.user> (doc evt/listen!)
-------------------------
domina.events/listen!
([type listener] [content type listener])
  Add an event listener to each node in a DomContent. Listens for events during the bubble phase. Returns a sequence of listener keys (one for each item in the content). If content is omitted, binds a listener to the document's root element.
nil
#Object[TypeError TypeError: Cannot read property 'listen_BANG_' of undefined]
TypeError: Cannot read property 'listen_BANG_' of undefined
    at eval (eval at <anonymous> (http://localhost:3000/main.out/weasel/repl.js:30:470), <anonymous>:1:102)
    at eval (eval at <anonymous> (http://localhost:3000/main.out/weasel/repl.js:30:470), <anonymous>:9:3)
    at eval (eval at <anonymous> (http://localhost:3000/main.out/weasel/repl.js:30:470), <anonymous>:14:4)
    at http://localhost:3000/main.out/weasel/repl.js:30:465
    at http://localhost:3000/main.out/weasel/repl.js:39:4
    at cljs.core.MultiFn.call.G__9227__2 (http://localhost:3000/main.out/cljs/core.js:31994:106)
    at cljs.core.MultiFn.call.G__9227 [as call] (http://localhost:3000/main.out/cljs/core.js:32261:19)
    at null.<anonymous> (http://localhost:3000/main.out/weasel/repl.js:184:71)
    at goog.events.EventTarget.fireListeners (http://localhost:3000/main.out/goog/events/eventtarget.js:284:23)
    at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:3000/main.out/goog/events/eventtarget.js:381:26)

As soon as I require the same namespaces in a namespace declaration in the file, everything works as expected in the bREPL as well.

@Deraen
Copy link
Contributor

Deraen commented Nov 19, 2015

This is related to #32 and #22

hoeck pushed a commit to hoeck/boot-cljs-repl that referenced this issue Apr 12, 2016
Allows setting the :output-dir for code compiled on the cljs repl (e.g.
when require-ing a namespace) and other cljs repl options.

fixes adzerk-oss#36
hoeck pushed a commit to hoeck/boot-cljs-repl that referenced this issue Apr 12, 2016
Allows setting the :output-dir for code compiled on the cljs repl (e.g.
when require-ing a namespace) and other cljs repl options.

fixes adzerk-oss#36
@hoeck hoeck linked a pull request Apr 12, 2016 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants