Open hantuzun opened 9 years ago
This looks like a problem with the spock library--are you also using it?
Spock is the name of out project :)
I don't think spiral does anything weird with loading libs--could you share a simple reproducible case with me, so that I could debug it?
Sure thing, just give me a day or two.
Looking forward to it! On Mon, Aug 10, 2015 at 4:29 AM Emrehan Tüzün notifications@github.com wrote:
Sure thing, just give me a day or two.
— Reply to this email directly or view it on GitHub https://github.com/dgrnbrg/spiral/issues/19#issuecomment-129363113.
Here is it: https://github.com/emrehan/failing-spiral
Thanks, I'm looking into this over the next week or so, to come up with a fix! On Thu, Aug 13, 2015 at 7:46 AM Emrehan Tüzün notifications@github.com wrote:
Here is it: https://github.com/emrehan/failing-spiral
— Reply to this email directly or view it on GitHub https://github.com/dgrnbrg/spiral/issues/19#issuecomment-130635733.
I've got the repro working, and I've discovering a bizarre thing. If I first do a (require 'project.core :reload)
and (require 'project.rest :reload)
, then the bug with ring-reload doesn't show up. It seems something very strange is going on with the namespace dependency tracking and the way that ring-reload handles it, as compared to when I do the requires myself (which seems to initialize something differently).
Oh, that's strange. The issue could be caused by Clojure compiler as well. CLJ-1544 had cost me some time back then.
I'm really not sure what's going on. I've further determined that even if I do those require
s, then ring-reload definitely invokes using (require ... :reload)
, but also the source file is not reloaded, so it just silently fails.
Perhaps you could require the specific namespaces yourself from your editor? That's what I do.
@dgrnbrg; how could I require namespaces from an editor? I didn't get it.
Which editor do you use? I can give you specific instructions. Basically, most editors have a keyboard shortcut to do (require 'current-ns :reload) On Wed, Aug 26, 2015 at 8:32 AM Emrehan Tüzün notifications@github.com wrote:
@dgrnbrg https://github.com/dgrnbrg; how could I require namespaces from an editor? I didn't get it.
— Reply to this email directly or view it on GitHub https://github.com/dgrnbrg/spiral/issues/19#issuecomment-134984053.
Okay, I use Idea, but I can't see how doing (require 'current-ns :reload)
would help a project run without problems.
Once you've got the server running, you can reload whichever namespace you're working in, so that all invocations to the new vars are picked up. Unfortunately, repl-driven development with core.async is hard, because it keeps old code running unless you shut it down cleanly.
On Thu, Aug 27, 2015 at 12:49 AM Emrehan Tüzün notifications@github.com wrote:
Okay, I use Idea, but I can't see how doing (require 'current-ns :reload) would help a project run without problems.
— Reply to this email directly or view it on GitHub https://github.com/dgrnbrg/spiral/issues/19#issuecomment-135290452.
Thanks. Would it help in production?
I would recommend against using ring-reload or anything like it in production--the best practice is to create an "uberjar" (which contains all your dependencies), so that you can trust the state of the deployment.
On Thu, Aug 27, 2015 at 10:18 AM Emrehan Tüzün notifications@github.com wrote:
Thanks. Would it help in production?
— Reply to this email directly or view it on GitHub https://github.com/dgrnbrg/spiral/issues/19#issuecomment-135449299.
Yes, you're right. We're running uberjars as well, but we should use ring-reload only in development profile.
I've tried make spiral and ring-reload work together without success.
I'm getting the following error:
How can we resolve the issue?
Thanks!