Perhaps this discussion should move to the nrepl-el mailing list or the
like, but I just discovered a bit more trying to figure this out. I noted
that the .lein/profiles.clj documentation had been updated in the
ritz/nrepl documentation. Namely that :hooks is scoped to the :user block
and not at the same level as :user. Unfortunately, now when I run lein deps
I get the following error message:
Error: cannot resolve ritz.add-sources/activate hook
This is from a revised .lein/profiles.clj of:
{:user {:plugins [[lein-ritz "0.6.0"]]
:dependencies [[ritz/ritz-nrepl-middleware "0.6.0"]
[clojure-complete "0.2.2"]]
:repl-options {:nrepl-middleware
[ritz.nrepl.middleware.javadoc/wrap-javadoc
ritz.nrepl.middleware.simple-complete/wrap-simple-complete]}
:hooks [ritz.add-sources]}}
Am I running into some sort of issue by not using the snapshot version of
lein-ritz? I am using leiningen 2.0.0-preview10, with clojure 1.4, and the
rest of the dependencies are furnished by the lein profile.clj. I did
verify that without manually adding clojure-complete, I still get the error
about missing complete's init. Note that the hooks error does not prevent
nrepl-ritz-jack-in from bringing up an nrepl buffer. The same is true for
missing clojure-complete, but the completion mechanism throws an
exception every time I hit tab.
I also updated the corresponding portion of my init.el to require
'nrepl-ritz on using an nrepl, but I presume that is happening anyway due
to nrepl-ritz-jack-in triggering the nrepl-ritz autoload.
Let me know if any other information would help in diagnosing what's
different about my environment?
Thanks,
Charlie
On Monday, December 10, 2012 6:38:09 PM UTC-6, Charles Comstock wrote:
>
> No, that wasn't the problem, early on when I tried to use nrepl and ritz I
> experimented with clojure 1.5, but as far as I know all of these issues I
> encountered after switching back to 1.4. In response to someone elses
> question, I also was definitely using fresh copies of nrepl, presuming all
> the autoloads execute require in the correct order after executing
> nrepl-ritz-jack-in, as I would encounter the problem with missing the
> complete library even after a fresh emacs reboot.
>
> I'm happy to help diagnose this issue locally so as to get a permanent fix
> for all of us who may have been afflicted with these errors. I discovered
> the need to load in clojure-complete after diagnosing that was what was
> supposed to provide that namespace, but wasn't quite sure how it was
> intended to be added to the dependency list in the first place. Wasn't sure
> if nrepl-ritz was overriding that, or if it was a problem with core nrepl.
>
> Charlie
>
> On Monday, December 10, 2012 3:59:27 AM UTC-6, Chas Emerick wrote:
>>
>>
>> On Dec 8, 2012, at 6:37 PM, Charles Comstock wrote:
>>
>> I still encounter some sort of issue where it appears that the
>> documentation querying functions, find-doc, and doc and the like are not
>> being properly brought into the repl namespace, which breaks ctrl-d d until
>> I manually bring that into the namespace. I'm not quite certain what was
>> causing that problem and have yet to find a permanent fix.
>>
>>
>> Are you using a recent Clojure 1.5.0 beta build? A change went in
>> recently to fix some behaviour where nREPL would inadvertently refer all of
>> the REPL utilities (doc, find-doc, pp, etc.) into *every* namespace. When
>> used with Clojure 1.5.0, nREPL now only refers those vars into the user ns,
>> matching the default Clojure REPL defaults.
>>
>> (I actually got used to the old behaviour myself, but it can cause
>> serious problems, e.g.:
>> http://code.google.com/p/counterclockwise/issues/detail?id=443)
>>
>> This all said, it's definitely the case that some piece of the toolchain
>> (probably clients like reply and nrepl.el, based on project.clj / profile
>> config) should instigate global namespace refers so that these vars, or
>> some subset, in addition to whatever vars you use most often in your
>> workflow/project/application are always available. Meditation on this
>> topic continues. :-)
>>
>> Cheers,
>>
>> - Chas
>>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en