Fork me on GitHub
#cursive
<
2021-11-05
>
mike_ananev11:11:39

I'm experiencing a constant problem: Idea+Cursive hangs too often. Idea 2021.2.3, Cursive 1.12.0-eap1-2021.2 (stable version behaves the same), Clojure CLI version 1.10.3.998 Steps I made: 1. Open one project 2. Open another project (never mind what project is) 3. See message about Synchronizing project 4. Idea is not responding...

onetom12:11:42

u havent mentioned which OS are you on and I can't really tell from the screenshot. although the structure of the filename suggests, it's probabyl macOS, but which version of macOS? i don't have hanging issues on this macOS Monterey setup with the EAP version of IntelliJ and Cursive: IntelliJ IDEA 2021.3 Beta (Ultimate Edition) Build #IU-213.5605.12, built on November 3, 2021 IntelliJ IDEA EAP User Expiration date: December 3, 2021 Runtime version: 11.0.13+7-b1751.16 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: ide.allow.merge.buttons=false editor.show.notification.after.reformat=false Non-Bundled Plugins: AceJump (3.8.3) com.4lex4.intellij.solarized (2.4.0) indent-rainbow.indent-rainbow (1.6.2) org.jetbrains.plugins.localization (213.5605.12) mobi.hsz.idea.gitignore (4.3.0) name.kropp.intellij.makefile (213.5605.12) AWSCloudFormation (213.5605.12) org.toml.lang (213.5605.12) ru.adelf.idea.dotenv (2021.3.0.213) PlantUML integration (5.7.2) com.dmarcotte.handlebars (213.5605.12) com.cursiveclojure.cursive (1.12.0-eap1-2021.3) com.intellij.plugins.html.instantEditing (213.5605.12) Kotlin: 213-1.5.10-release-949-IJ5605.12

mike_ananev15:11:19

MacOS Big Sur 11.6

cfleming20:11:35

So when this happens, the whole IDE locks up? If that’s the case, check for the automatically generated thread dumps: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond. If you have some there from recent hangs, please bundle them up and email them to me at <mailto:[email protected]|[email protected]>

mike_ananev11:11:05

If I kill an Idea app and reopen any project everything works fine, until next hang.

Colin P. Hill13:11:18

I'm trying to get Cursive to recognize the functions defined in honeysql.helpers. They use a macro, defhelper, which looks like defn except that it creates an additional arity with an extra parameter beyond the explicitly declared ones. Adding a custom resolution so that it resolves as defn works until I get to an invocation which uses that extra parameter, at which point Cursive complains about the arity. How can I get Cursive to resolve these correctly?

cfleming21:11:58

You can’t unfortunately. If you could file an issue for it, I’ll look at adding support in Cursive until you can do that yourself.

Colin P. Hill15:11:57

Ah, I see the problem...we're on an old version of honeysql! Still want an issue, or are old versions out of scope for Cursive support?

cfleming20:11:42

If it’s not an issue in the latest version then no, I’d just wait for that to cease being a problem.

👍 1
folcon20:11:24

How does cursive decide which files to send when you call Sync Files in REPL \ Load File in REPL with nrepl? Does it wait for nrepl to respond in some way before sending the next file along? I'm evaling at the top namespace in a project, and it appears to only be sending my utils namespace, which is one the namespaces that requires no other files in my project, so it makes sense that would be the first ns sent, but I'm wondering why nothing else seems to be being sent...

cfleming21:11:05

Sync files will look at all modified files, and then send those files and all their modified dependencies in dependency order (i.e. dependencies before the files that depend on them). Load File does pretty much the same, but does it just for the file you invoke it on whether that file is modified or not.

folcon00:11:53

Hmm, not sure why, but when I'm launching a new remote repl I only seem to be sending my utils.clj, it's not a big issue, as I've got a work around of calling load-file for my core ns, which seems to cause all my other files to load, but I'm surprised as it normally just works. I'm listening to the nrepl messages to determine that none of the other namespaces are sent. This is on clojure-clr, but I'm not using any specific behaviour, so a bit puzzled why it's happening. The behaviour worked perfectly, but appeared to break yesterday... Thanks for the heads up @U0567Q30W 😃

cfleming06:11:25

That does sound odd. I’m not in front of my computer but IIRC there’s some debug logging you can turn on to get a better idea of what’s happening and why. When I can I’ll send some info (assuming my memory is correct)

onetom10:11:30

i would also be interested in some debug logging related to file loading/syncing. i keep experiencing inexplicable situations, which i can't reliable reproduce or comprehend. i did identify one pattern, which contributes to this mysterious behaviour. if i (def some-data ...) in NS1 and def some other value, derived from some-data in NS2, then changes of same-data in NS1, will not trigger the re-computation of the derived value in NS2. it sounds obvious that one shouldn't do this and use functions instead, but it's easy to fall into this trap... one example, which i was just fixing yesterday, would be to have a malli schema, which we use for generating a datomic schema. it doesn't change during the regular operation of the program, but during development, obviously it does. until we had only one file containing both the malli and the derived datomic schema as defs, everything was fine. no so much, after moving the computed datomic schema into other namespaces...

cfleming21:11:27

I’ve checked the code and there isn’t any debug logging around this, but there should be. I’ll add that for the next build.