Fork me on GitHub
#calva
<
2021-10-28
>
pez07:10:54

I can recommend listening to the ClojureScript podcast in general. And this episode is extra relevant for Calva friends. If you are curious about some more Calva specific details than the episode provides (which is not about Calva, but about clojure-lsp), see my replies on @jacek.schae’s announcement. https://clojurians.slack.com/archives/C8NUSGWG6/p1635304356079600

👍 3
clojure-lsp 4
🎉 1
❤️ 1
il-tmfv07:10:22

Hi! After one of the recent updates refactor suggestions from the lightbulb icon stopped working for me (like "Move to let"). Nothing happens. But they do work if I use command palette for them. Also I cannot do simple renames ("Rename Symbol" command) — "No result." info popup appears and that's it. Previously it worked perfectly event across multiple namespaces. Tried to clear lsp and kondo dotfiles, no results. I don't use REPL for this particular project.

pez08:10:22

Please file an issue about it. I am not sure if this is on the #lsp side of things or Calva’s, but I suspect the latter.

ericdallo12:10:51

Next clojure-lsp will have feedback when a rename doesn't work, most cases are: you have wrong source-paths configured for your project

metal 2
il-tmfv14:10:45

Thanks, at this point we have mixed setup: both project.clj and deps.edn are present. We are planning to move to a single deps.edn file. Some time ago I configured :source-paths in .lsp/config.edn file and everything was working really well. But now for some reason it does'n. BTW I try to rename local var in let inside of one function. And it doesn't work showing "No result." popup. I've tried to remove these things:

rm -rf .clj-kondo/.cache
rm -rf .lsp/.cache
but it didn't help. Maybe I miss something? Feels like it started to happen after the update that introduced new highlighting (sorry, don't know how express it, I've just noticed that things like @ or / now have it is own colours, something with lang tokens I guess). Clojure is not my main lang nowadays, so I cannot say for sure.

ericdallo14:10:32

if rename is not working, it's not related with caches but wrong source-paths, check which source-paths clojure-lsp is returning when initializing via the new calva command to get clojure-lsp logs

il-tmfv15:10:33

Hm, this log file contains the following error

2021-10-28T15:07:52.956Z UnknownHost INFO [clojure-lsp.server:419] - Starting server...
2021-10-28T15:07:58.112Z UnknownHost DEBUG [clojure-lsp.nrepl:19] - nrepl not found, skipping nrepl server start...
2021-10-28T15:07:58.172Z UnknownHost INFO [clojure-lsp.server:303] - Initializing...
2021-10-28T15:07:58.120Z UnknownHost ERROR [taoensso.timbre:796] - Uncaught exception on thread: main
 [37mclojure_lsp.main.main[m  [32m             [m
                   [37m...[m  [32m             [m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 151[m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 153[m
 [33mclojure-lsp.main/[1;33mexit[m  [32mmain.clj: 116[m
                   [37m...[m  [32m             [m
[1;31mjava.lang.NullPointerException[m: [3m[m

2021-10-28T15:07:58.260Z UnknownHost INFO [clojure-lsp.source-paths:132] - Using given source-paths: #{"clojure/test/clj" "clojure/src/cljs" "clojure/src/cljc" "clojure/src/clj" "clojure/test/cljc" "clojure/test/cljs"}
Sorry, it is malformed in the file too. Paths look right, at least to me 🙂 they also worked just fine in the past.

ericdallo15:10:49

yeah, that exception is weird, but the source-paths are correct

ericdallo15:10:39

@UFU7GAE15 coud you try making a simple repro using the same file structure and confirm if it works? with that I can test it as well

👍 1
il-tmfv15:10:44

Hmm, I removed config file and renaming started to work again One thing that is not working properly is auto ns for new files, it adds extra symbols: (ns ...cljs.<proper path here>) but this is fine by me Very strange 🙂 The good thing that I can reproduce incorrect renaming, working on a minimal setup

ericdallo15:10:05

the wrong ns when creating new files is related to wrong source-paths as well :thinking_face:

1
il-tmfv16:10:21

Here is minimal repro: https://github.com/il-tmfv/repro_calva_rename Renames like fn args doesn't works for me, but if I remove config file it starts to work

ericdallo16:10:04

thanks I can take a look later today

❤️ 1
ericdallo23:10:06

@UFU7GAE15 it turns out there is no bug: • your deps.edn has a :paths ["clojure/src/clj"] • your project.clj has no specific :source-paths so clojure-lsp will consider the default line source-paths #{"src" "src/main/clojure" "test" "src/test/clojure"} clojure-lsp will merge those paths and consider that as the source-paths as you can see in the logs:

ericdallo23:10:55

since there is no source-path for the clojure/src/cljs folder, renaming/new files on that source-path won't work properly unless you configure it via deps.edn, project.clj or via clojure-lsp config as you did

ericdallo23:10:39

about the (ns ...cljs.<proper path here>) , this is indeed a bug, but I'll change clojure-lsp to not create any ns when it's not a valid source-path

il-tmfv07:10:39

@UKFSJSM38 thanks! But I'm a bit confused here 🙂 > since there is no source-path for the `clojure/src/cljs` folder, renaming/new files on that source-path won't work properly unless you configure it via deps.edn, project.clj or via clojure-lsp config as you did So clojure/src/cljs is specified and LSP knows about it, right? > or via clojure-lsp config as you did And in the reproduction repo it is specified, but renames do not work for both clj and cljs folders. Or does it work for you?

ericdallo12:10:51

I didn't see any clojure/sec/cljs in the project configuration besides the LSP config, like you did, it works to me, but if I remove the config, it doesn't as you said

il-tmfv13:10:06

hm, if I open this project without changes in vscode it doesn't work for me 😐 and if I remove .lsp/config.edn and restart it starts to work

il-tmfv13:10:03

maybe something is not right with my setup outside of VScode

ericdallo13:10:30

hum, yeah, that's odd

ericdallo13:10:45

are you using latest calva, right?

il-tmfv13:10:06

I have M1 mac, maybe it is related But I use JDK from Azul for M1:

openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Zulu 8.56.0.23-CA-macos-aarch64) (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Zulu 8.56.0.23-CA-macos-aarch64) (build 25.302-b08, mixed mode)
There was problems with the old filewatcher for figwheel, for example, but failed to start completely

ericdallo13:10:35

the clojure-lsp used by calva is the compiled with graalvm, a native binary, so I don't think JVM versions would cause that 😔

ericdallo13:10:18

could you try openinig the project in calva, trying renaming, can past your clojure-lsp log? latest calva there is a new command to get clojure-lsp log

il-tmfv13:10:21

I've opened the repro project and tried to rename one arg of sub fn in clojure/src/clj/proj/core.clj :

2021-10-29T13:34:13.484Z UnknownHost INFO [clojure-lsp.server:419] - Starting server...
2021-10-29T13:34:18.642Z UnknownHost DEBUG [clojure-lsp.nrepl:19] - nrepl not found, skipping nrepl server start...
2021-10-29T13:34:18.703Z UnknownHost INFO [clojure-lsp.server:303] - Initializing...
2021-10-29T13:34:18.647Z UnknownHost ERROR [taoensso.timbre:796] - Uncaught exception on thread: main
 [37mclojure_lsp.main.main[m  [32m             [m
                   [37m...[m  [32m             [m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 151[m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 153[m
 [33mclojure-lsp.main/[1;33mexit[m  [32mmain.clj: 116[m
                   [37m...[m  [32m             [m
[1;31mjava.lang.NullPointerException[m: [3m[m

2021-10-29T13:34:18.805Z UnknownHost INFO [clojure-lsp.source-paths:132] - Using given source-paths: #{"clojure/src/cljs" "clojure/src/clj"}
2021-10-29T13:34:19.221Z UnknownHost INFO [clojure-lsp.db:?] - Reading analysis cache from Datalevin db took 0.39 secs
2021-10-29T13:34:19.227Z UnknownHost INFO [clojure-lsp.crawler:154] - Using cached classpath for project root /Users/timofeev/projects/reprofs
2021-10-29T13:34:19.229Z UnknownHost INFO [clojure-lsp.crawler:234] - Analyzing source paths for project root /Users/timofeev/projects/reprofs
2021-10-29T13:34:19.231Z UnknownHost INFO [clojure-lsp.feature.clojuredocs:40] - Refreshing clojuredocs cache...
2021-10-29T13:34:19.396Z UnknownHost INFO [clojure-lsp.crawler:?] - Project only paths analyzed, took 0.17 secs
2021-10-29T13:34:19.405Z UnknownHost DEBUG [clojure-lsp.server:?] - :initialize 701ms
2021-10-29T13:34:19.423Z UnknownHost INFO [clojure-lsp.server:350] - Initialized!
2021-10-29T13:34:19.428Z UnknownHost DEBUG [clojure-lsp.server:?] - :initialized 4ms
2021-10-29T13:34:19.430Z UnknownHost WARN [clojure-lsp.server:251] - {}
2021-10-29T13:34:19.431Z UnknownHost INFO [clojure-lsp.kondo:?] - Linting whole project files took 0.04 secs
2021-10-29T13:34:19.458Z UnknownHost DEBUG [clojure-lsp.server:?] - :didOpen 24ms
2021-10-29T13:34:19.507Z UnknownHost DEBUG [clojure-lsp.server:?] - :documentSymbol 33ms
2021-10-29T13:34:19.543Z UnknownHost DEBUG [clojure-lsp.server:?] - :semanticTokensRange 16ms
2021-10-29T13:34:19.559Z UnknownHost DEBUG [clojure-lsp.server:?] - :codeAction 78ms
2021-10-29T13:34:19.734Z UnknownHost DEBUG [clojure-lsp.server:?] - :semanticTokensFull 2ms
2021-10-29T13:34:21.118Z UnknownHost INFO [clojure-lsp.feature.clojuredocs:?] - Refreshing clojuredocs cache took 1.89 secs.
2021-10-29T13:34:36.374Z UnknownHost DEBUG [clojure-lsp.server:?] - :hover 24ms
2021-10-29T13:34:39.796Z UnknownHost DEBUG [clojure-lsp.server:?] - :rename 8ms

ericdallo13:10:43

that exception at the start is really odd, but I still think it's not related with the issue

ericdallo13:10:57

could you try clojure-lsp master? I made some improvements to feedback why rename doesn't work

il-tmfv13:10:20

of course, but not sure how to do it 🙂

ericdallo13:10:35

right, calva has a setting to point to a clojure-lsp path

ericdallo13:10:47

but first we need to build clojure-lsp master local in your machine

ericdallo13:10:46

to do that: 1. clone clojure-lsp project https://github.com/clojure-lsp/clojure-lsp/ 2. run make , it should build a clojure-lsp binary at the project root 3. change calva setting to use that clojure-lsp

il-tmfv13:10:39

working on it

il-tmfv13:10:11

2021-10-29T13:50:38.078Z UnknownHost INFO [clojure-lsp.server:429] - Starting server...
2021-10-29T13:50:43.823Z UnknownHost INFO [clojure-lsp.nrepl:18] - ====== LSP nrepl server started on port 56544
2021-10-29T13:50:43.827Z UnknownHost ERROR [taoensso.timbre:796] - Uncaught exception on thread: main
 [37mclojure_lsp.main.main[m  [32m             [m
                   [37m...[m  [32m             [m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 151[m
[33mclojure-lsp.main/[1;33m-main[m  [32mmain.clj: 153[m
 [33mclojure-lsp.main/[1;33mexit[m  [32mmain.clj: 116[m
                   [37m...[m  [32m             [m
[1;31mjava.lang.NullPointerException[m: [3m[m

2021-10-29T13:50:43.862Z UnknownHost INFO [clojure-lsp.server:312] - Initializing...
2021-10-29T13:50:43.925Z UnknownHost INFO [clojure-lsp.source-paths:132] - Using given source-paths: #{"clojure/src/cljs" "clojure/src/clj"}
2021-10-29T13:50:43.962Z UnknownHost ERROR [clojure-lsp.db:70] - Could not load project cache from DB java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
2021-10-29T13:50:43.963Z UnknownHost INFO [clojure-lsp.crawler:160] - Analyzing classpath for project root /Users/timofeev/projects/reprofs
2021-10-29T13:50:43.964Z UnknownHost INFO [clojure-lsp.crawler:27] - Finding classpath via `lein classpath`
2021-10-29T13:50:44.718Z UnknownHost DEBUG [clojure-lsp.crawler:39] - Classpath found, paths:  ["/Users/timofeev/projects/reprofs/test" "/Users/timofeev/projects/reprofs/src" "/Users/timofeev/projects/reprofs/dev-resources" "/Users/timofeev/projects/reprofs/resources" "/Users/timofeev/projects/reprofs/target/cljsbuild" "/Users/timofeev/projects/reprofs/target/classes" "/Users/timofeev/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.jar" "/Users/timofeev/.m2/repository/clojure-complete/clojure-complete/0.2.5/clojure-complete-0.2.5.jar" "/Users/timofeev/.m2/repository/org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar" "/Users/timofeev/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar" "/Users/timofeev/.m2/repository/org/clojure/google-closure-library/0.0-20201211-3e6c510d/google-closure-library-0.0-20201211-3e6c510d.jar" "/Users/timofeev/.m2/repository/com/google/javascript/closure-compiler-unshaded/v20210202/closure-compiler-unshaded-v20210202.jar" "/Users/timofeev/.m2/repository/org/clojure/google-closure-library-third-party/0.0-20201211-3e6c510d/google-closure-library-third-party-0.0-20201211-3e6c510d.jar" "/Users/timofeev/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar" "/Users/timofeev/.m2/repository/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" "/Users/timofeev/.m2/repository/nrepl/nrepl/0.8.3/nrepl-0.8.3.jar" "/Users/timofeev/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar" "/Users/timofeev/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar" "/Users/timofeev/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar" "/Users/timofeev/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar" "/Users/timofeev/.m2/repository/com/cognitect/transit-clj/0.8.309/transit-clj-0.8.309.jar" "/Users/timofeev/.m2/repository/org/clojure/clojurescript/1.10.844/clojurescript-1.10.844.jar" "/Users/timofeev/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar" "/Users/timofeev/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar"]
2021-10-29T13:50:44.720Z UnknownHost INFO [clojure-lsp.crawler:27] - Finding classpath via `clojure -A:dev:test -Spath`
2021-10-29T13:50:44.729Z UnknownHost DEBUG [clojure-lsp.crawler:39] - Classpath found, paths:  ["test" "clojure/src/clj" "/Users/timofeev/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar" "/Users/timofeev/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar" "/Users/timofeev/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar"]
2021-10-29T13:50:44.731Z UnknownHost INFO [clojure-lsp.kondo:134] - Analyzing 28 paths with clj-kondo with batch size of 1 ...
2021-10-29T13:50:50.633Z UnknownHost INFO [clojure-lsp.kondo:125] - [clj-kondo] Already seen the file /Users/timofeev/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar before, skipping
[clj-kondo] Already seen the file /Users/timofeev/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar before, skipping
[clj-kondo] Already seen the file /Users/timofeev/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar before, skipping

2021-10-29T13:50:50.634Z UnknownHost INFO [clojure-lsp.crawler:?] - External classpath paths analyzed, took 5.90 secs. Caching for next startups...
2021-10-29T13:50:50.809Z UnknownHost INFO [clojure-lsp.crawler:?] - Manual GC after classpath scan took 0.10 secs
2021-10-29T13:50:50.811Z UnknownHost INFO [clojure-lsp.crawler:234] - Analyzing source paths for project root /Users/timofeev/projects/reprofs
2021-10-29T13:50:50.814Z UnknownHost INFO [clojure-lsp.feature.clojuredocs:40] - Refreshing clojuredocs cache...
2021-10-29T13:50:50.814Z UnknownHost ERROR [taoensso.timbre:796] - Uncaught exception on thread: async-dispatch-6
                                              [37mjava.lang.Thread.run[m  [32m            Thread.java:  748[m
                                                               [37m...[m  [32m                             [m
[33mclojure.core.async.impl.concurrent/counted-thread-factory/reify/[1;33mfn[m  [32m         concurrent.clj:   29[m
                [37mjava.util.concurrent.ThreadPoolExecutor$Worker.run[m  [32mThreadPoolExecutor.java:  624[m
                 [37mjava.util.concurrent.ThreadPoolExecutor.runWorker[m  [32mThreadPoolExecutor.java: 1149[m
                                                               [37m...[m  [32m                             [m
                         [33mclojure-lsp.crawler/analyze-classpath!/[1;33mfn[m  [32m            crawler.clj:  175[m
      [33mclojure.core.async.impl.ioc-macros/[1;33mrun-state-machine-wrapped[m  [32m         ioc_macros.clj:  982[m
              [33mclojure.core.async.impl.ioc-macros/[1;33mrun-state-machine[m  [32m         ioc_macros.clj:  978[m
   [33mclojure-lsp.crawler/analyze-classpath!/fn/[1;33mstate-machine--auto--[m  [32m            crawler.clj:  175[m
[33mclojure-lsp.crawler/analyze-classpath!/fn/state-machine--auto--/[1;33mfn[m  [32m            crawler.clj:  176[m
                                         [33mclojure-lsp.db/[1;33msave-deps![m  [32m                 db.clj:   48[m
                                            [33mclojure-lsp.db/[1;33mmake-db[m  [32m                 db.clj:   37[m
                                            [33mdatalevin.core/[1;33mopen-kv[m  [32m              core.cljc:  883[m
                                                               [37m...[m  [32m                             [m
                                         [33mdatalevin.binding.java/[1;33mfn[m  [32m               java.clj:  451[m
                                     [37morg.lmdbjava.Env$Builder.open[m  [32m               Env.java:  512[m
                                     [37morg.lmdbjava.Env$Builder.open[m  [32m               Env.java:  486[m
[1;31mjava.lang.NoClassDefFoundError[m: [3mCould not initialize class org.lmdbjava.Library[m

2021-10-29T13:50:50.837Z UnknownHost INFO [clojure-lsp.crawler:?] - Project only paths analyzed, took 0.03 secs
2021-10-29T13:50:50.841Z UnknownHost DEBUG [clojure-lsp.server:?] - :initialize 6982ms
2021-10-29T13:50:50.847Z UnknownHost INFO [clojure-lsp.kondo:?] - Linting whole project files took 0.01 secs
2021-10-29T13:50:50.861Z UnknownHost INFO [clojure-lsp.server:360] - Initialized!
2021-10-29T13:50:50.864Z UnknownHost DEBUG [clojure-lsp.server:?] - :initialized 2ms
2021-10-29T13:50:50.865Z UnknownHost WARN [clojure-lsp.server:260] - {:settings {}}
2021-10-29T13:50:52.939Z UnknownHost INFO [clojure-lsp.feature.clojuredocs:?] - Refreshing clojuredocs cache took 2.12 secs.
2021-10-29T13:50:55.008Z UnknownHost DEBUG [clojure-lsp.server:?] - :didOpen 12ms
2021-10-29T13:50:55.020Z UnknownHost DEBUG [clojure-lsp.server:?] - :documentSymbol 7ms
2021-10-29T13:50:55.021Z UnknownHost DEBUG [clojure-lsp.server:?] - :semanticTokensFull 4ms
2021-10-29T13:50:55.025Z UnknownHost DEBUG [clojure-lsp.server:?] - :documentHighlight 11ms
2021-10-29T13:50:55.033Z UnknownHost DEBUG [clojure-lsp.server:?] - :codeAction 23ms
2021-10-29T13:50:55.224Z UnknownHost DEBUG [clojure-lsp.server:?] - :codeAction 10ms
2021-10-29T13:50:58.355Z UnknownHost ERROR [clojure-lsp.interop:107] - Responding with error  {
  "code": -32602,
  "message": "Can\u0027t rename, not valid source-paths. Are project source-paths configued correctly?"
}
2021-10-29T13:50:58.358Z UnknownHost DEBUG [clojure-lsp.server:?] - :rename 5ms

ericdallo14:10:53

""Can\u0027t rename, not valid source-paths. Are project source-paths configued correctly?"" Indeed related to source-path :thinking_face:

ericdallo14:10:54

hum, that org.lmdbjava.Library is a problem with datalevin, maybe something that doesn't work with M1 @U0A74MRCJ? (it's the JVM clojure-lsp not graalvm image)

il-tmfv15:10:48

@UKFSJSM38 thanks for your time ❤️ I'm surprised that nobody else reported something similar, so I hope only my setup is affected for some reason 🙂

Huahai15:10:53

Unfortunately, M1 architecture is not supported. The reason is the lack of available CI platform for the architecture, so no pre-compiled LMDB is available for it.

Huahai15:10:38

If anyone knows about a CI platform that supports this architecture, I am happy to build a package for it.

Huahai15:10:07

That’s also the reason why GraalVM doesn’t support M1 either. No CI platform has it, so people who own M1 are on their own. At least for now.

Huahai15:10:03

it’s easy to compile LMDB, so it’s possible to compile your own, and set lmdbjava.native.lib system property to the location of that library for LMDBJava, if you are determined.

ericdallo16:10:35

thank you for the explanation @U0A74MRCJ, it makes sense, for now this affects only clojure-lsp cache @UFU7GAE15, not related with your issue

il-tmfv16:10:43

Thanks 👍 good to hear I will try to clear vscode cache or something like that, review settings and so on. My setup is pretty old now. Maybe will try clean install.

👍 1
il-tmfv17:10:29

Nothing helped 😐 Interesting that when there is NO config I can rename, but it also reports a lot of unused public vars until I open files where those vars are used And when I add config I cannot rename, but there are no reports about unused vars

ericdallo17:10:05

that's quite weird, maybe you should open an issue on Calva so we can debug it better? not sure what we can do anymore :thinking_face:

il-tmfv18:10:52

I've tried to play with different lsp versions: 2021.09.30-15.28.01 - works 2021.10.20-13.04.11 - doesn't work they go next to each other so something changed in 2021.10.20-13.04.11

ericdallo18:10:00

@UFU7GAE15 we had some fixes that may have affected that: https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.10.20-13.04.11 it was probably working by luck 😅

ericdallo18:10:16

anyway, I suggest you open an issue with all those info and the repro project

ericdallo18:10:23

so I and calva maintainers can debug later

il-tmfv18:10:09

ok, will do it 👍 in lsp or calva repo?

ericdallo18:10:51

I'ld start with the calva repo

👍 2
sparkofreason15:10:42

Seeing a lot of these lately. Sometimes restarting VSCode makes it go away. Is there extra info somewhere for debugging? I'm on calva 2.0.222.

Running the contributed command: 'calva-fmt.formatCurrentForm' failed.

bringe15:10:31

Can you consistently reproduce this issue in a specific file or for a specific form? I wonder if the code itself has something that’s tripping up the formatter.

sparkofreason19:10:27

It might only happen when I use this macro, which is weird, because it's very similar to defqueries below it. https://github.com/Provisdom/maali/blob/master/src/provisdom/maali/rules.cljc#L211

sparkofreason19:10:47

Not sure why it would make a difference anyway, since presumably the formatter isn't doing any macro expansion.

sparkofreason20:10:16

Even that isn't consistent. Seems to only happen in some files/projects that I've tested.

bringe02:10:44

If you can provide a repro case that’s consistent that would be great. You can try checking the developer console for any errors, too. Help -> Toggle Developer Tools -> Console.

sparkofreason16:10:08

Still working on a repro I can share. Here's what's in the console:

ERR [Extension Host] Error in `_formatIndex`: Namespaced keywords not supported !
console.ts:137 [Extension Host] Error in `_formatIndex`: Namespaced keywords not supported !
v @ console.ts:137

bringe23:10:06

Ahh I think this is an issue with the old fork of cljfmt that Calva uses, in which it doesn’t handle namespaced keywords when formatting. I believe we plan to upgrade to the upstream cljfmt eventually. Am I correct, @U0ETXRFEW?

mateus.henrique.brum18:10:09

Hi everybody, actually I am trying to run calva in Mac, but seems like the basic command for evaluate it is not there, after fire up the "Getting Started", I can not evaluate/run the code. There is something missing?

pez19:10:22

Sounds like it, for sure. Can you describe in details each step you take? Do you have Java installed?

mateus.henrique.brum21:10:27

Actually I can see the commands when second click, but all disabled

mateus.henrique.brum21:10:26

java and clojure CLI

mateus.henrique.brum21:10:22

I have noticed this in my console, I suppose nREPL did not start correct as well

bringe02:10:14

Looks like an issue related to Java, but I’m not sure what could be going wrong. What happens when you run clj -M --repl?

bringe02:10:27

I’m not sure what might be going wrong. Feel free to create an issue so we can troubleshoot there.

pez10:10:23

There are two issues here: 1. Something prevents the jack-in from working. Probably a dependency conflict. If you copy the jack-in command using Calva’s command for this and run that in the terminal it should crash the same way, I am assuming. Share that command with us here and maybe we can see ways you can experiment to pinpoint the actual problem. 2. Calva should be informing you in a clearer way that jack-in didn’t work and that the REPL is not connected. That would make it clearer for you that evaluation will not work and also why the REPL commands are disabled.

mateus.henrique.brum12:11:01

Well, I am using a mac with M1 processor, I just realised I had some weird errors before in my Java program, after some research they recommended me to use Zulu JDK, and that solved the Calva issue as well, at the end of the day it was some OpenJDK incompatibility on M1 processors … Thank you guys.

pez12:11:46

Awesome. And good to know. I am going to get an M1 mac delivered in a few minutes. 😃

mateus.henrique.brum14:11:19

That is the version I am using, hope it helps… openjdk version "1.8.0_312" OpenJDK Runtime Environment (Zulu 8.58.0.13-CA-macosx) (build 1.8.0_312-b07) OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macosx) (build 25.312-b07, mixed mode)