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

Weasel isn't working in this project #33

Closed
borkdude opened this issue Oct 24, 2014 · 11 comments
Closed

Weasel isn't working in this project #33

borkdude opened this issue Oct 24, 2014 · 11 comments

Comments

@borkdude
Copy link

I tried enhancing this todo-mvc project with a weasel repl:

https://github.com/borkdude/todo-cljs

To start the weasel repl you can type lein repl followed by (brepl).
To build the cljs part of the project, type lein cljsbuild once dev
When opening in the browser I get a connection refused on port 9005, even though weasel prints it is running on port 9005.

Hopefully someone can take a look at this. Thanks in advance!

@tomjakubowski
Copy link
Collaborator

Weasel 0.4.1 only supports Clojurescript 2311 and newer. Can you see if the project works with weasel 0.3.0, or if you can update the Clojurescript dependency?

It seems wrong that Maven/Leiningen is allowing weasel "0.4.1" to be used with a version of Clojurescript earlier than is specified in weasel's project file. I think project.clj specifying clojurescript as a "provided" dependency could be problematic.

@borkdude
Copy link
Author

@tomjakubowski I don't understand what you say. The cljs version is set to 2342: https://github.com/borkdude/todo-cljs/blob/master/project.clj#L9

@tomjakubowski
Copy link
Collaborator

Oh gosh, sorry about that. I didn't realize that was a released version when I wrote the hack to make Weasel work with 2311. I'll push out a 0.4.2-SNAPSHOT in a bit which should support 2342.

@borkdude
Copy link
Author

@tomjakubowski I could downgrade to 2311 if that fixes the problem?

@tomjakubowski
Copy link
Collaborator

Okay, I've pushed out 0.4.2-SNAPSHOT to clojars. Can you give that a try with your project? If it works (simple testing on my end seemed good), I'll cut a 0.4.2 release.

@borkdude
Copy link
Author

2311 worked. Now I'll try 2342.

@borkdude
Copy link
Author

Works. One question left:

Why does (in-ns 'todo-cljs.todos), (add-todo "foo") throw me an error, but (ns todo-cljs.todos), (add-todo "foo") doesn't? I've had this with other browser REPLs as well. The error I'm seeing is:

"Error evaluating:" (add-todo "foo") :as ".add_todo.call(null,"foo");\n"
#<SyntaxError: Unexpected token .>
SyntaxError: Unexpected token .
at http://localhost:8000/js/out/weasel/repl.js:21:744
at http://localhost:8000/js/out/weasel/repl.js:28:4
at cljs.core.MultiFn.call.G__6410__2 (http://localhost:8000/js/out/cljs/core.js:20846:18)
at cljs.core.MultiFn.call.G__6410 as call
at null. (http://localhost:8000/js/out/weasel/repl.js:109:415)
at goog.events.EventTarget.fireListeners (http://localhost:8000/js/out/goog/events/eventtarget.js:285:23)
at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:8000/js/out/goog/events/eventtarget.js:382:26)
at goog.events.EventTarget.dispatchEvent (http://localhost:8000/js/out/goog/events/eventtarget.js:197:34)
at goog.net.WebSocket.onMessage_ (http://localhost:8000/js/out/goog/net/websocket.js:411:8)

@tomjakubowski
Copy link
Collaborator

There are a couple problems with namespaces at the REPL right now. in-ns being broken is likely related to #32. I'm not sure what made it break but I plan on investigating and hopefully fixing in the next day or two. If you've got an idea, patches are always welcome, of course! 👍

@borkdude
Copy link
Author

Thanks. I'll close this issue.

@tomjakubowski
Copy link
Collaborator

Thanks for reporting! And sorry about the version numbering confusion.

@tomjakubowski
Copy link
Collaborator

BTW there is now a 0.4.2 release. 🍻

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

No branches or pull requests

2 participants