Closed olymk2 closed 3 years ago
cljr navigates to deps.edn it returns a message saying cider is not jacked in, however I am connected and can evaluate in any cljs file so definitely jacked in.
Maybe you had only CLJS REPL. Can you try to jack-in in both REPL (clj & cljs) ?
I was using the other jack in tried with clj & cljs however and hit the same issue, it opens the project.clj file instead of the deps.edn file and does not start updating any packages.
Do you have tried if it works with a basic template?
clj -Sdeps '{:deps
{seancorfield/clj-new
{:mvn/version "0.9.0"}}}' \
-m clj-new.create \
app \
hello/world
Delete/rename the pom.xml file at root directory before cljr-update-project-dependencies
.
so the above works, the differences I can see are that the hello world app is clojure and not clojure script and the presence of a project.clj also causes issues.
Adding this to the root means the deps file no longer updates.
(defproject hello.world "0.1.0-SNAPSHOT"
:uberjar-name "server.jar"
:target-path "target/%s"
:source-paths ["src" "src/clj" "src/cljs"]
:ring {:handler server-rendering.handler/app}
:plugins [[lein-tools-deps "0.4.5"] [lein-ring "0.12.5"]]
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
:lein-tools-deps/config {:config-files [:install :user :project]})
how ever on a clojurescript project with out a project.clj file I just get the CIDER is not connected error even though I am connected and can eval inside emacs.
anything else you would like me to try ?
anything else you would like me to try ?
Yes, next step you can try a Clojurescript template:
clj -Sdeps '{:deps{seancorfield/clj-new {:mvn/version "0.9.0"}}}'d -m clj-new.create figwheel-main hello-world.core -- --reagent
Then:
cider-jack-in-clj&cljs
cljr-update-project-dependencies
that also works, fails with project.clj again and i noticed this in the messages buffer.
I will look at difference between this and another project to see if i can figure out why its not working in my other projects
okay my bad I tried again and it seems to have worked must have been working on auto pilot with jack in cljs, is there a reason it would work with one and not the other ?
thanks for the help, i guess the project file may still be an issue anyway separate to the dep not updating at all issue.
Another idea.
In your project, you can try the sesman-browser
command after jack-in to check if
clj REPL is running.
Maybe your the CLJS REPL start but the CLJ failing for some reasons (wrong config, etc).
should clj always exist even when using a cljs only project ? I always check the repl but usually I only have a cljs repl because I am working on cljs only projects, I do check they are connected.
what is wierd is the clj+cljs shows 2 clj repls not a clj and cljs repl.
you can also see the connection to the other project which is currently a cljs repl only.
should clj always exist even when using a cljs only project ?
AFAIK to use some commands of clj-refactor, yes.
what is wierd is the clj+cljs shows 2 clj repls not a clj and cljs repl.
It's because your REPL Figwheel failed higher then fallback to CLJ REPL I guess.
With Cider for running figwheel-main template, we must edit the REPL command with manually adding -A:fig
.
Thanks for your help on this @prestancedesign!
If this shows up again, maybe there's something we can do on our end to prevent this from happening.
Expected behavior
when running cljr-update-project-dependencies cljr should ask to update dependencies.
Actual behavior
cljr navigates to deps.edn it returns a message saying cider is not jacked in, however I am connected and can evaluate in any cljs file so definitely jacked in.
note I had to remove project.clj perhaps putting deps.edn before project.clj in the code is a good idea ? as project.clj can use deps.edn via a plugin.
Steps to reproduce the problem
local clojurescript project with deps.edn and no projec.clj file jack in and call cljr-update-project-dependencies.
Environment & Version information
clj-refactor.el version information
clj-refactor 2.5.0-SNAPSHOT, refactor-nrepl is unreachable
CIDER version information
Leiningen or Boot version
using clj and deps.edn
Emacs version
GNU Emacs 26.3 (build 1, x86_64-solus-linux-gnu, GTK+ Version 3.24.11) of 2019-10-05
Operating system
solus 4.1