-
Notifications
You must be signed in to change notification settings - Fork 99
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
Does lein-ring support reload changed namespaces somehow? #187
Comments
Adding namespaces work the same way; it's likely that you're just trying to access the namespace without an associated |
Yeah I need to restart lein app when I introduce new namespace or change one of them, is there any chance to do some adjustment and make this namespace loading automatically? |
It should automatically load by default. Could you give some more information about this issue? So for instance:
|
I was using "0.11.0" but now updated to "0.12.0" and it works I could not reproduce now. |
@weavejester I think the problem is Clojure.I'm getting Compiler exception: reproduce steps: I guess Clojure caches the first cl.controller.auth namespace's alias which is auth. Then I refactor(rename) the cl.controller.auth to cl.controller.auth-service so I get that exception. Is there any way to unalias the alias and redefine it? This is the reason why I have to restart the app. |
Personally I like to use the reload function from
https://github.com/clojure/tools.namespace but it's a very big hammer and
it's some work to be sure your code will cooperate with it
…On Sat, Jun 17, 2017, 9:21 AM Ertuğrul Çetin ***@***.***> wrote:
@weavejester <https://github.com/weavejester> I think the problem is
Clojure.I'm getting Compiler exception:
Alias auth already exists
reproduce steps:
first I have this ->[cl.controller.auth :as auth]
after I change this to that-> [cl.controller.auth-service :as auth]
I guess Clojure caches the first *cl.controller.auth* namespace's aliases
which is auth. Then I refactor(rename) the *cl.controller.auth* to
*cl.controller.auth-service* so I get that exception.
Is there any way to unalias the alias and redefine it?
This is the reason why I have to restart the app.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#187 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMv1eOU9oDdnNUwWpQTPdeMfL52QmErks5sE_0MgaJpZM4N53aV>
.
|
@weavejester any updates regarding that comment? |
Updates in what respect? Lein-Ring uses Clojure's reload mechanism, which won't work in the case where you're trying to overwrite an existing namespace alias. It doesn't currently make use of |
got it thank you so much! |
When I add a new namespace to my project or change couple of those my ring application throws an exception that says namespace couldn't be found.I can see changes when I don't touch the namespaces which is very cool but I also want to see the changes when I change (add/delete/update) namespaces.
Does lein-ring support this built in with some configuration?
The text was updated successfully, but these errors were encountered: