Fork me on GitHub
#cursive
<
2018-09-11
>
mfikes03:09:04

@simon.orlovsky Yes. Preferences, Editor > Code Style > Clojure, General, Align let-binding values

👍 2
2
danm08:09:45

Hmm. Exception during stub generation. I can see what has happened, but I have no idea how to fix it...

danm09:09:40

My error is Error generating stubs for module availability-event-builder: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isReferenceType()Z, compiling:(core.clj:209:1). Is there a cache that is used for stub generation that I should be clearing or something? com.fasterxml.jackson.databind is referenced by a library (also written by our team and under a different folder in the same IntelliJ project, added as a separate lein project) that the module in question is pulling in

stijn09:09:06

hey, I'm trying to migrate a project from leiningen to deps.edn, but I'm not getting it imported. I can run from the command line with -m and -r.

stijn09:09:23

the first thing I'm seeing is that in the deps.edn config the Clojure command 'failed'

stijn09:09:31

under 'Use CLI tools (recommended)'. the path is /usr/local/bin/clj

stijn09:09:54

and the idea.log shows java.lang.ClassNotFoundException: clojure.java.api.Clojure

stijn09:09:05

also /usr/local/bin/clojure does not work either

stijn09:09:06

ok, when I use tools.deps directly it works

manutter5111:09:32

@carr0t Under the File menu there's Invalidate Caches / Restart, have you tried that?

cfleming12:09:35

@stijn When that command fails, is there anything useful in the log? Help-&gt;Show log in Finder/Explorer

cfleming12:09:41

You’re on OSX IIRC, right?

stijn12:09:32

no, archlinux, I'll recheck the logs, but I didn't see anything when opening that dialog

stijn12:09:20

no, no error in the log

cfleming12:09:51

Ok, I’ll fix that - you should definitely at least get a sensible message there.

stijn12:09:09

but, like I said, if I use tools.deps directly everything works properly

stijn12:09:44

maybe it's because I have both the arch package clojure and the clj command line tool installed

stijn12:09:56

i'll try to remove the arch package

cfleming12:09:26

Or a more detailed one, at least. Where do you have the CLI stuff installed? If you look in Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, does it correctly detect the version and the config dir?

stijn12:09:26

hmmm, ok I don't have clojure separately installed on arch, just the CLI tools

stijn12:09:00

❯ which clj
/usr/local/bin/clj
❯ which clojure
/usr/local/bin/clojure

stijn12:09:03

does the version of the script matter?

cfleming12:09:45

No, but I want to see if Cursive is managing to get the results from clojure -Sdescribe

stijn12:09:31

ok, I have installed the latest version and now I do not get an error message

cfleming12:09:48

Very strange

stijn12:09:53

and it properly detects CLI version in IntelliJ

stijn12:09:37

i had version 1.9.0.273, now on 391

cfleming12:09:31

Ok. It’ll probably be hard to determine what was going on now it’s fixed, but I’m glad it works 🙂

stijn12:09:46

haha, yeah 🙂

stijn12:09:04

Is there a way to see the stacktrace of the exceptions that the deps sync is throwing?

stijn12:09:35

oh, ok, in the log 😉

stijn12:09:17

not that it's helping though...

stijn12:09:20

Caused by: com.intellij.openapi.externalSystem.model.ExternalSystemException: java.lang.String cannot be cast to java.io.File
        at cursive.deps.ToolsDepsResolver.resolve(ToolsDepsResolver.kt:65)
        at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:273)
        at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:240)
        at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37)
        at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:58)
        at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
        ... 23 more

cfleming12:09:08

Is there a cause exception after that?

stijn12:09:55

that's the last one

cfleming12:09:03

What’s the first one?

cfleming12:09:19

Actually, can you just paste the whole lot?

cfleming12:09:29

Perhaps via DM