This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-16
Channels
- # announcements (5)
- # aws (34)
- # beginners (145)
- # cider (48)
- # circleci (8)
- # clara (7)
- # clj-kondo (28)
- # cljs-dev (75)
- # cljsrn (4)
- # clojure (325)
- # clojure-czech (10)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-sweden (3)
- # clojure-uk (70)
- # clojurescript (18)
- # clr (1)
- # community-development (2)
- # cursive (38)
- # data-science (7)
- # datascript (14)
- # datomic (22)
- # emacs (2)
- # figwheel (1)
- # fulcro (6)
- # graalvm (22)
- # graphql (11)
- # hoplon (12)
- # jackdaw (8)
- # jobs-discuss (16)
- # juxt (5)
- # leiningen (19)
- # luminus (5)
- # nrepl (2)
- # nyc (1)
- # off-topic (6)
- # overtone (2)
- # pedestal (10)
- # re-frame (6)
- # reagent (8)
- # reitit (1)
- # rewrite-clj (43)
- # ring (2)
- # shadow-cljs (124)
- # testing (1)
- # vim (22)
- # xtdb (77)
- # yada (4)
Ah, yeah. I didn’t understand you were talking about a mixed Clojure/Java project at first. Makes sense now that you mentioned Maven… 😄
So, I'm using Boot and tools.namespace, and when I reload the code with the latter and then use M-.
to jump to a function definition, it jumps not to the source code file, but into the temporary source file that Boot creates. Anyone else had a similar problem?
And that is apparently because when I use tools.namespace, then the defined vars have :file in their metadata that is relative to the project resource root (e.g. foo/bar.clj
, not /Users/me/blabla/src/foo/bar.clj
). And then CIDER resolves that stuff from the classpath, and on the classpath Boot keeps its temporary "fileset" files
@alexyakushev Does this problem occur only after reloading?
Yep. When I recompile a file naturally with C-c C-k
, all vars get absolute :file
metadata.
This tangentially brings me to another question: since we are doing CL development in Docker, we are using this SLIME's feature slime-filename-translations
that allows us to set up translations from in-Docker paths to local filesystem paths, so that we can use M-.
.
Is there anything like that in CIDER, or would it be possible to implement manually?
When it comes to Boot resources CIDER also tries to resolve them using Boot’s fake.class.path
. Maybe I managed to break this around the recent changes in Orchard related to classpath lookups…
Yeah, I know that Boot is hard to deal with 😞 I'd love to switch to something simpler but we are just too invested into it at this point.
Bozhidar, I'm trying to find what changes to Orchard could trigger this behavior regarding Boot and tools.namespace (because I don't think it worked like that before) but I can't find it. Could you please point me to the commit(s)?
https://github.com/clojure-emacs/orchard/commit/b83826f42604f5f9bf59e25a535ef9d3ddb3c5db
We had a misunderstanding (I think he wasn’t familiar with Boot and I didn’t pay much attention to this part of the changes).
I tried first to just patch things up on the cider-nrepl side https://github.com/clojure-emacs/cider-nrepl/commit/49462f13c5a87ff071551150cc6ceb61ef967c8c
I’m pretty sure those two commits should give you an idea about where exactly the regression is.
Should I make an issue in Orchard regarding this? From a quick glance, it seems that it wouldn't be hard to salvage the Boot functionality by just bringing the code back.
Yeah, I guess Jeff underestimated the impact of this, as he made many breaking API changes along the way.
> Should I make an issue in Orchard regarding this? From a quick glance, it seems that it wouldn’t be hard to salvage the Boot functionality by just bringing the code back.
That’s one way to approach this. @richiardiandrea already has a PR bringing back some of this in the context of another huge PR. 😄
I guess it might be better to restore this separately, but I’ll take everything that solves the problem. Too many tasks, too little time to make everything right.
Also, my PR should have tests around this so it makes me feel a bit better 😅
The other massive PR for compliment is also ready so I guess we are close to kill cljs-tooling
😃😃
@richiardiandrea Yeah, sorry about that one moving slowly 😬
No worries! I am excited where this brings us really 😁😁
when trying to run and connect to a shadow-cljs app I'm getting a ton of nrepl middleware warnings and then get errors when trying to connect to the repl (using cider/cider-nrepl and cider/piggieback with vim fireplace). https://pastebin.com/se1cJESJ This was working a few weeks ago but I'm on a fresh install so don't know what has changed. any clues?
this is the error message I get when trying to connect: https://pastebin.com/ZueFshz0
relevant portion of shadow-cljs.edn
:
:dependencies [[binaryage/devtools "0.9.10"]
[cider/cider-nrepl "0.21.1"]
[cider/piggieback "0.4.1"]
[reagent "0.8.0"]]
@chase-lambert It seems you’re spinning a legacy tools.nrepl server. Are you running Lein 2.9?
> Exception in thread “nREPL-worker-0” java.lang.ClassCastException: cider.nrepl.middleware.track_state$make_transport$reify__30991 cannot be cast to clojure.tools.nrepl.transport.Transport
just got it solved over in #shadow-cljs The version of Shadow-cljs in the tutorial I'm following was quite outdated I guess.
Ah, ok. But every time you see clojure.tools.nrepl
in the error you’re running an old server or you have a depedency on the old server.
Ahh. Maybe that old shadow-cljs dependency was calling to the old server? A bit above my head. Anyways, thank you for the quick response!