Closed ashwinbhaskar closed 2 years ago
Hi Ashwin!
Could you please try the steps in https://github.com/ptaoussanis/encore#recommended-steps-after-any-significant-dependency-update, and let me know if that helps?
Thanks
Have the same issue, and the link above no longer points to anything.
@timlucmiptev Hi Basile,
Have the same issue, and the link above no longer points to anything.
The previous link pointed to "Step 3/3" here: https://www.taoensso.com/dependency-conflicts
Please let me know if that helps?
It did, in that I was able to isolate the actual issue, which was that compilation fails earlier with No such var: enc/println-atomic
It did, in that I was able to isolate the actual issue, which was that compilation fails earlier with No such var: enc/println-atomic
Great, thanks for the confirmation 👍 That then sounds like a dependency conflict - for which steps 1-2 on the same page should be applicable.
I prefer using Calva for connecting to REPL but it throws Syntax error compiling at (taoensso/timbre/appenders/core.cljc:50:11) No such var: enc/println-atomic
. it doesn't error and works fine when I start REPL from lein repl
CLI command.
Calva uses this command to start the REPL
lein update-in :dependencies conj '[nrepl/nrepl,"1.1.1"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.47.1"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +something repl
I also had a look into lein deps :tree
, Only dep I notice that's conflicting with timbre is org.clojure/tools.reader
@U-C-S Hi Chanakya, I'm not familiar with Calva - how are you specifying your dependencies?
Have you tried the linked steps to resolve?
Thanks for the quick response
Yes, i did follow linked steps to resolve and here's my project.clj after that
(defproject something-server "0.20200609"
:dependencies [[org.clojure/clojure "1.11.1"]
[io.pedestal/pedestal.service "0.5.10"]
[io.pedestal/pedestal.route "0.5.10"]
[io.pedestal/pedestal.jetty "0.5.10"]
.
.
[com.taoensso/encore "3.85.0"]
[com.taoensso/timbre "6.5.0"]
[com.fzakaria/slf4j-timbre "0.4.1"]
[org.slf4j/slf4j-api "1.7.30"]
[jdbc-ring-session "1.3"
:exclusions [com.taoensso/nippy]]
[integrant]
[integrant/repl]
[com.taoensso/carmine]
.
.
[nrepl/nrepl]]
:plugins [[lein-environ "1.1.0"]
[lein-pprint "1.2.0"]
[cider/cider-nrepl "0.47.1"]] ;; this
:profiles {:import
{:injections [(->> 'something.csv-import/dev-config
requiring-resolve
var-get
(partial integrant.core/prep)
integrant.repl/set-prep!)]
:repl-options {:nrepl-middleware ["cider.nrepl/cider-middleware"]} ;; this
:main ^:skip-aot something.csv-import}})
I added cider-nrepl
as a plugin and configured :repl-options
accordingly, (which is what the calva command does) and now lein repl
also fails with same error. But if I remove the cider-nrepl
and :repl-options
, repl runs normally
Could you please try again using the latest version of Encore?
I.e. please replace [com.taoensso/encore "3.85.0"]
in your :dependencies
with [com.taoensso/encore "3.113.0"]
.
If there's any errors, please share the exact error/s.
It might also be worth trying to move [com.taoensso/encore "3.113.0"]
to the top of your :dependencies
, especially if those "."'s mean that you're truncating your list of dependencies.
I tried with the latest version and also moving the dep to top, still the same error. Nothing in the truncated "." deps are related to this atleast. Guessing this error is more related to lein and cider-nrepl, Maybe I will try messing with config of both a bit more, but appreciate for the help so far.
the exact error
$ lein repl
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.test.check.generators, being replaced by: #'clojure.test.check.generators/abs
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/chanakya/.m2/repository/com/fzakaria/slf4j-timbre/0.4.1/slf4j-timbre-0.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/chanakya/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Syntax error compiling at (taoensso/timbre/appenders/core.cljc:50:17).
No such var: enc/println-atomic
Full report at:
/var/folders/nn/s7bvrvgd6550r1cglzrqdh500000gn/T/clojure-9843509124901983690.edn
Subprocess failed (exit code: 1)
REPL server launch timed out.
appreciate for the help so far
No worries, you're welcome 👍 Sorry you're running into trouble!
Just to confirm: running lein clean
doesn't help?
No such var: enc/println-atomic
most likely implies that an older version of Encore is somehow being used [0]. (It for sure exists in v3.113.0).
Possible causes (sorted in ~order of expected probability):
taoensso.elide-deprecated
JVM prop or related ENV var, causing the mentioned var to be elided.For [0]: You could try print enc/encore-version to confirm.
For [1]: this can be difficult to pinpoint. You'd need to check which of your deps is AOT'd and uses Encore. I'd start by checking slf4j-timbre
since I believe that can sometimes be a bit fragile.
For [2]: I'd double check lein deps :tree
, ~/.lein/profiles.clj
(or equivalent), and plugins that may influence deps
For [3]: You could try print (enc/get-env {:as :bool} :taoensso.elide-deprecated<.platform>)
. If that's true, something is setting the relevant system value.
For [4]: I'd recommend trying to setup a minimal project that works - then start adding your dependencies or project.clj customizations in 1-by-1 until you can identify what's causing the problem.
Feel free to ping here if you there's any questions I can help with!
I am using
[com.taoensso/timbre "5.1.0"]
. When I import[taoensso.timbre :as t]
and load the file in REPL, I get the following errorBut I am able to navigate to that
taoensso.timbre.appenders.core
. What could be causing this issue?