xquery-mode / oook-selector

Convenience tools for interacting with MarkLogic
1 stars 2 forks source link

`C-c m x` result in `Namespace not found.` #6

Open fgeorges opened 7 years ago

fgeorges commented 7 years ago

Hi. I've just followed all the steps in the install guide. Everything looks OK as far as I can tell.

I tried to call C-c m x 'Hello, world!' RET in order to test everything is OK, but it always fails with the message Namespace not found. Nothing else in the buffer *Messages*.

I tried to replace 'Hello, world!' with 1 + 1 or *, same error every time.

Any idea what could be wrong? Any idea how I can look for and provide you with more info?

fgeorges commented 7 years ago

It's just occurred to me that I used MarkLogic 9 (the new EA 4). So it is maybe related.

If you cannot reproduce it with ML8, I'd be glad to help and investigate on my own, especially if you point me to a verbose flag to log more info ;-)

fgeorges commented 7 years ago

Just to mention that I have just tried with a MarkLogic 8 instance (8.0-4.2 exactly), and I get the exact same behaviour. I did not restart Emacs, but made sure to call xdmp-propagate-server-to-oook:

(defvar drkm:conf/marklogic-host "some-ml-8"
  "The host name of the MarkLogic instance to use from Emacs.")
(setq xdmp-servers
  `(:rest-server (:host ,drkm:conf/marklogic-host :port "8002" :user "admin" :password "admin")
    :xdbc-server (:host ,drkm:conf/marklogic-host :port "8000" :user "admin" :password "admin")))
(xdmp-propagate-server-to-oook)
m-g-r commented 7 years ago

Florent, I'm so sorry it took so long. I think I finally found the problem and have fixed it. It is currently in a pull request of Oook (https://github.com/xquery-mode/oook/pull/2) and I will update Oook Selector when that one is merged.

I couldn't reproduce the problem for quite some time, even with a seemingly fresh installation on my private machine that I've also used on XML Prague. Now, I had the problem on a Mac OS X machine and thought that might be the source, but after a lot of debugging found out that it was neither a problem of Oook Selector, Oook, and Uruk directly, but rather an incompatible change in Cider. And cider was installed via Emacs' package-install that always fetches the most recent version. I located the culprit only after creating a new user with a fresh and empty home directory.

Five minutes of git bisecting later I located this commit as introducing the incompatible change:

commit efe15912fa66c4f7547e223d3b7ed7142572e059 Author: dpsutton dpsutton@users.noreply.github.com Date: Sun Jan 22 19:27:23 2017 -0600

Remove session from nrepl interaction (#1925) See https://github.com/clojure-emacs/cider/commit/efe15912fa66c4f7547e223d3b7ed7142572e059

I have adapted Oook now as described in the pull request; sadly, this also is an incompatible change for Oook, so now it requires a version of Cider more recent than that commit (~2017-01-22).

Cheers, Max

m-g-r commented 7 years ago

PS: If you want to test it right now, you can execute:

cd oook-selector/deps/oook
git fetch
git checkout fix-nrepl-eval-for-recent-cider

Don't forget to clean up again, when Oook and Oook Selector are updated, with:

cd oook-selector
git pull
git submodule update

Thanks, Max

m-g-r commented 7 years ago

Ok, we added a recommendation to pin cider to melpa-stable in https://github.com/xquery-mode/oook-selector/blob/master/INSTALL.md#install-cider, and pointed to the right section of the Oook Readme where we now explain what to do if you need to use a development version of Cider.

Also added an explicit mentioning of the "Namespace not found." message to the README. I hope we can close this issue now. Do you agree @fgeorges?

Cheers, Max