This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-22
Channels
- # announcements (1)
- # beginners (179)
- # boot (8)
- # calva (3)
- # cider (4)
- # clara (3)
- # cljdoc (31)
- # clojure (9)
- # clojure-austin (1)
- # clojure-chicago (5)
- # clojure-dev (19)
- # clojure-nl (2)
- # clojure-uk (1)
- # clojurescript (13)
- # core-matrix (1)
- # cursive (86)
- # datascript (2)
- # datomic (13)
- # emacs (3)
- # figwheel-main (1)
- # fulcro (66)
- # off-topic (250)
- # pathom (7)
- # re-frame (19)
- # reitit (5)
- # sql (37)
- # uncomplicate (5)
Does a recent version of Cursive support mount's defstate
macro, at least so that it can be interpreted as def
?
@cjmurphy You can teach it yourself: https://cursive-ide.com/userguide/macros.html
(Cursive should probably support that one natively, since Mount is pretty popular these days, but it looks like it doesn’t out of the box)
I know about that trick from Fulco, get the yellow lightbulb up and it is one of the options, but the only option I'm getting is "Create function 'defstate'".
That can sometimes happen if the intention gets disabled, check under Preferences | Editor | Intentions | Clojure | Resolution that it’s enabled.
My Cursive is version 1.7.0-2017.3. But I think s/be recent enough to have the 'redefine as' stuff.
Can you send a screenshot of what you’re seeing when you alt-enter on the lightbulb?
@cjmurphy Oh, so in that case it looks like it can’t actually resolve defstate
itself. Is that dep definitely added to your project? You can see that in the dependencies tree in the lein toolwindow on the right.
mount:0.1.6 is indeed there in the dependencies tree on the right. Also, well, mount is doing its thing, so I'm sure that mount is there.
I suspect that defstate itself is defined using a macro, and I dimly remember something about this. One sec.
Right, I remember now, see: https://github.com/cursive-ide/cursive/issues/1847
I've clicked file -> new -> project -> deps in cursive and its generated a file with
{:deps {}}
inside but cursive shows me this error:I have clojure up to date with
brew upgrade clojure
both clj and clojure work on the terminal they start a repl with the latest version
I can see there is something called Commands that are empty
reinstalling cursive yields the same result, the commands menu isn't there if cursive is uninstalled
I think I solved it by ticking:
openjdk 8
@sfyire You need to configure deps at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps. In your case you should select “Use CLI tools”.
You can also configure that in the project creation/import wizard, but it’s not obvious sometimes.
I already have Use CLI tools
selected but when I create a Clojure Application
in Run configuration
, I get The Clojure jar is not attached to this module
. Any idea what I'm doing wrong?
@norbertpy That means that Clojure isn’t added as a dependency to that module. How did you create the project?
If you open the Clojure Deps toolwindow (View | Tool Windows | Clojure Deps), is your project registered there?
The window opens but there is nothing in there but then if I try to add it, it says It's already registered
. I added clojure as a dependency from Alex Miller's hint but I get Sync Failed
messages.
No:
java.lang.ExceptionInInitializerError
at com.intellij.externalSystem.JavaProjectData.<clinit>(JavaProjectData.java:44)
at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:313)
at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:291)
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacadeImpl$1.invoke(RemoteExternalSystemFacadeImpl.java:115)
at com.sun.proxy.$Proxy3.resolveProjectInfo(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.MissingResourceException: Can't find bundle for base name messages.JavaCoreBundle, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at com.intellij.core.JavaCoreBundle.getBundle(JavaCoreBundle.java:45)
at com.intellij.core.JavaCoreBundle.message(JavaCoreBundle.java:33)
at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:24)
Hmm, yeah, it’s not that old but the deps support is built on an API that changes pretty frequently.
@norbertpy This looks like your problem: https://github.com/cursive-ide/cursive/issues/2011