This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-03
Channels
- # announcements (8)
- # aws (2)
- # babashka (16)
- # beginners (173)
- # calva (13)
- # cider (4)
- # cljfx (6)
- # cljs-dev (108)
- # clojure (63)
- # clojure-australia (2)
- # clojure-dev (10)
- # clojure-europe (73)
- # clojure-italy (8)
- # clojure-nl (4)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (49)
- # clojureverse-ops (4)
- # community-development (3)
- # core-async (23)
- # cursive (3)
- # data-science (5)
- # datomic (25)
- # emacs (3)
- # events (1)
- # fulcro (13)
- # helix (5)
- # introduce-yourself (1)
- # lein-figwheel (1)
- # lsp (36)
- # malli (1)
- # meander (2)
- # membrane (4)
- # music (8)
- # nextjournal (51)
- # off-topic (47)
- # other-languages (5)
- # pathom (31)
- # pedestal (5)
- # planck (14)
- # polylith (5)
- # portal (1)
- # re-frame (30)
- # react (2)
- # reagent (24)
- # releases (1)
- # rewrite-clj (18)
- # ring (9)
- # sci (33)
- # shadow-cljs (49)
- # testing (3)
- # tools-build (21)
- # tools-deps (29)
- # vim (19)
- # web-security (1)
- # xtdb (12)
Morning folks, my lovely tree-transformer from a couple of weeks ago (which is really just a thin wrapper around clj-rewrite’s walker) works fine when I run using “lein run”. However, our app is deployed via this jlib plugin that builds layered images rather stuffing the uberjar onto an image and running it. (new to me but seems intended to build more efficient images). Anyway, when I run the app via this image, I get the following error when invoking “ofString” to get the clj-zipper.
Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReader
at clojure.tools.reader.reader_types$eval439$fn__440.invoke(reader_types.clj:223)
at clojure.tools.reader.reader_types$eval420$fn__421$G__411__428.invoke(reader_types.clj:215)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invokeStatic(reader_types.clj:379)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invoke(reader_types.clj:371)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invokeStatic(reader_types.clj:376)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invoke(reader_types.clj:371)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invokeStatic(reader_types.clj:374)
at clojure.tools.reader.reader_types$indexing_push_back_reader.invoke(reader_types.clj:371)
at rewrite_clj.reader$string_reader.invokeStatic(reader.cljc:264)
at rewrite_clj.reader$string_reader.invoke(reader.cljc:261)
at rewrite_clj.parser$parse_string_all.invokeStatic(parser.cljc:42)
at rewrite_clj.parser$parse_string_all.invoke(parser.cljc:39)
at rewrite_clj.zip.base$of_string.invokeStatic(base.cljc:93)
at rewrite_clj.zip.base$of_string.invoke(base.cljc:85)
at rewrite_clj.zip.base$of_string.invokeStatic(base.cljc:91)
at rewrite_clj.zip.base$of_string.invoke(base.cljc:85)
at rewrite_clj.zip$of_string.invokeStatic(zip.cljc:264)
at rewrite_clj.zip$of_string.invoke(zip.cljc:258)
Anyone have any clues as to how I might fix this?hello folks, I'm having a similar issue to this one, but in my case is while trying to use cljstyle (which uses rewrite-clj under the hood), I saw @cddr you said something about conflicting dependencies, but in my case the cljstye is everything I put, I'm running with this: clojure -Sdeps "{:deps {mvxcvi/cljstyle {:mvn/version \"0.15.0\"}}}" -m cljstyle.main check src test
I'm pretty sure this command used to work in the past, but for some reason now I get:
java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderError while processing file src/dev/dev_extras.clj
java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderError while processing file test/integration/member_flow.clj
java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderError while processing file test/integration/health_check_flow.clj
...
checking the deps tree, it seems to be using the correct version of org.clojure/tools.reader 1.3.6
This was the ultimate thing that fixed our problem https://clojurians.slack.com/archives/CHB5Q2XUJ/p1644503442071609
thanks man, I considered that, but in my case there is no clojurescript in the game, wonder if there are any other ideas out there
@U066U8JQJ if you try from the same dir:
clojure -Sdeps "{:deps {mvxcvi/cljstyle {:mvn/version \"0.15.0\"}}}" -Stree
You might maybe see another older version of rewrite-clj/rewrite-cljs?
(`-Sdeps` are merged after your project deps)humm, good point, I tough -Sdeps
would replace the deps completely
using an alias with :replace-deps
I got it to work fine
do you know if there is a way to replace strait from teh command line (so I wouldn't need the alias)?
Hmmm… dunno. Without thinking about it too much… would a :replace-deps
not work from the cmd line?
if that count as an alias, maybe, let me try 🙂
found a thing that works, ugly, but works 😛 clojure -Sdeps "{:aliases {:cljstyle {:replace-deps {mvxcvi/cljstyle {:mvn/version \"0.15.0\"}}}}}" -M:cljstyle -m cljstyle.main check src test
@cddr I can also help if this turns out to be a classloader problem resulting from the how the image was constructed. The set of jars on your classpath should be pretty close to what you get from lein run
but I guess you're also maintaining a deps.edn
too right?
hello folks, I'm having a similar issue to this one, but in my case is while trying to use cljstyle (which uses rewrite-clj under the hood), I saw @cddr you said something about conflicting dependencies, but in my case the cljstye is everything I put, I'm running with this: clojure -Sdeps "{:deps {mvxcvi/cljstyle {:mvn/version \"0.15.0\"}}}" -m cljstyle.main check src test