This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-13
Channels
- # admin-announcements (296)
- # beginners (19)
- # boot (40)
- # cider (77)
- # clojure (139)
- # clojure-australia (2)
- # clojure-bangladesh (6)
- # clojure-dev (19)
- # clojure-japan (25)
- # clojure-russia (23)
- # clojure-sg (1)
- # clojure-uk (4)
- # clojurescript (131)
- # datomic (41)
- # editors (42)
- # ldnclj (35)
- # off-topic (11)
- # reagent (10)
Hey, anyone could help me with an error about missing namespace?
my project.clj looks like this: https://github.com/arathunku/game-fun/blob/feature/figwheel-cljs/tiled-mmo/server/project.clj
and when I start repl and run (reset)
from https://github.com/arathunku/game-fun/blob/feature/figwheel-cljs/tiled-mmo/server/env/dev/clj/tilet/repl.clj#L2
I get:
(reset)
:reloading (tilet.domain.extensions.transfer-data tilet.domain.ientity tilet.domain.player tilet.components.players-connections tilet.site.main_page tilet.site.site tilet.domain.mob tilet.components.game-loop tilet.components.map tilet.components.mobs_connections tilet.handler tilet.system tilet.repl)
:error-while-loading tilet.repl
=> #error {
:cause "No namespace: tilet.system"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "java.lang.Exception: No namespace: tilet.system, compiling:(tilet/repl.clj:1:1)"
:at [clojure.lang.Compiler load "Compiler.java" 7239]}
{:type java.lang.Exception
:message "No namespace: tilet.system"
:at [clojure.core$refer doInvoke "core.clj" 4080]}]
:trace
but in repl, I can switch to that namespace.
*ns*
=> #object[clojure.lang.Namespace 0x585e7d43 "tiled.system"]
vs tiled?
tilet
it is.
https://github.com/arathunku/game-fun/blob/feature/figwheel-cljs/tiled-mmo/server/src/clj/tilet/system.clj#L1
sorry, I can't switch to it in repl too
CompilerException java.lang.Exception: namespace 'tilet.system' not found,
Hmm, is it related to :gen-class? That may make it a class, not a namespace
But I’m honestly not sure - haven’t used :gen-class before
Yay, success! Thanks @surreal.analysis. Beginner once again bitten by bad error msgs. 😕
Glad to help
Hmm... another error with namespaces... Do I have to scope them in clj
?
https://github.com/arathunku/game-fun/blob/feature/figwheel-cljs/tiled-mmo/server/src/clj/tilet/system.clj#L3
https://github.com/arathunku/game-fun/blob/feature/figwheel-cljs/tiled-mmo/server/src/clj/tilet/handler.clj#L1
EPL server started on port 48821 on host 127.0.0.1 -
(reset)
:reloading (tilet.domain.extensions.transfer-data tilet.domain.ientity tilet.domain.player tilet.components.players-connections tilet.site.main-page tilet.site tilet.domain.mob tilet.components.game-loop tilet.components.map tilet.components.mobs_connections tilet.handler tilet.system tilet.repl)
:error-while-loading tilet.system
=> #error {
:cause "No namespace: tilet.handler"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "java.lang.Exception: No namespace: tilet.handler, compiling:(tilet/system.clj:1:1)"
:at [clojure.lang.Compiler load "Compiler.java" 7239]}
{:type java.lang.Exception
:message "No namespace: tilet.handler"
:at [clojure.core$refer doInvoke "core.clj" 4080]}]
:trace
What caused the error?
As it turns out, I had to do lein clean
after removing gen-class
. thanks @annapawlicka
@arathunku: glad it helped