Fork me on GitHub
#cursive
<
2019-07-24
>
danieroux08:07:15

I’m on the EAP as of today: (throw (ex-info "An error" {:keyed "error"})) Gives me this result:

danieroux08:07:49

That’s much better than the previous, thank you - I can see the message. Still surprising to see Syntax error, and can cope with that

cfleming10:07:40

@U9E8C7QRJ Is that now the same as you see using a REPL outside of Cursive?

cfleming10:07:54

Hopefully it should be if you’re using Clojure 1.10+

cfleming10:07:04

Actually, no, wait - my apologies, that fix is not in the latest EAP.

danieroux10:07:34

Ah, cool. I’ll wait for that fix then (am using 1.10.1, not seeing the same)

frankiesardo09:07:36

Morning everyone! Joined a new team that uses a variety of editors (atom, vim, emacs, cursive 🙂 ) what's the best plugin you use to keep formatting in sync? I am using parinfer for cursive and my team mates keep breaking it. I was considering something like zprint https://github.com/kkinnear/zprint but as far as I know there's not a nice way to integrate to cursive or am I wrong? Thoughts and help appreciated!

danieroux12:07:34

We’ve adopted https://tonsky.me/blog/clojurefmt fully. Cursive and Emacs formatting plays well together, except for destructuring in a let block, case/condp statements and type hinting.

❤️ 4
danieroux13:07:46

(let me know if you want the Emacs and Cursive settings to make this work)

salam17:07:37

this feels like a combination of social and technical problems. the technical problem is easy to fix as long as the social one is fixed first. 🙂

thumbnail18:07:02

In our team we build a formatter / linter which runs existing tools after a refresh/reload of the system, linting all changed files and reformatting staged files during development. It helped a lot as we've had a big influx of new clojurists. The tool isn't open source (yet) though :(

dominicm07:07:50

You might want to look into parlinter as the minimum people can agree on while having parinfer work @U050SU21B

kanwei14:07:05

upgraded to 2019.2 final release and nothing is resolving (using deps.edn)

salam17:07:18

@cfleming hasn't put out a stable Cursive release that's compatible with intelij idea 2019.2 yet (which is not uncommon for intellij idea plugins whenever a new intellij idea release comes out) and hopefully it will come out soon. meanwhile, you may switch to the latest eap release of Cursive if you would like to continue using it with intellij idea 2019.2: https://plugins.jetbrains.com/plugin/8090-cursive/versions

kanwei18:07:42

I'm on EAP 1.8.2-eap5, the latest one he shipped this morning

salam18:07:16

i'm afraid that you're right. i can confirm that cursive (https://plugins.jetbrains.com/plugin/8090-cursive/update/65985), when used with intellij idea 2019.2, is unable to resolve any symbol.

salam18:07:57

the only log entry that looks suspicious is:

2019-07-24 11:29:17,370 [ 511081]   WARN - eInsight.daemon.LineMarkerInfo - Performance warning: LineMarker is supposed to be registered for leaf elements only, but got: -main (class cursive.psi.impl.symbols.ClEditorSymbol) instead. First child: PsiElement(Symbol token) (class com.intellij.psi.impl.source.tree.LeafPsiElement)
Please see LineMarkerProvider#getLineMarkerInfo(PsiElement) javadoc for detailed explanations. 

cfleming21:07:52

@UDCGPTV9R @U0ELT5ZDE I believe this problem is https://github.com/cursive-ide/cursive/issues/2173, which appears to be worse under 2019.2. I’m speaking with the dev to see if there is anything that should have made it worse in 2019.2. Workarounds in the issue.

kanwei21:07:55

thanks for the update!

salam21:07:29

oh, i see. i thought that the occurrence of this issue is sporadic and can be worked around with a restart. as you mentioned, it indeed seems to have gotten worse. i’ll go ahead and vote for the youtrack issue. i would also encourage everybody who is affected by this issue to vote for it to help jetbrains correctly assess the severity of the matter.

kanwei14:07:31

even after invalidating caches and manually adding src folders

SgtZdog17:07:35

(reposted from #beginners ) Hello all! I could use help getting Cursive setup. I'm trying to debug some tests in the leiningen generated test folder and I don't know how to get a debugger (repl or otherwise) to tie into 'lein test' code execution.

SgtZdog17:07:06

(It should be noted I'm very new to Clojure overall)

salam17:07:53

@kevin.zemon cursive, when used with a leiningen project, has built-in support for running tests within the editor. you need to start a repl with the leiningen profile and then you should see run buttons in the gutter right next to test suite names.

salam17:07:45

from there on, you should be able to use intellij idea's built-in debugging features (marking a breakpoint in the gutter, single-step debugging, etc.).

shaun-mahood19:07:33

@cfleming I've just updated my intellij to the most recent (community edition, build 192.5728.98) and my cursive to 1.8.2-eap5-2019.2 and I'm having some issues with using projects based on deps.edn.

shaun-mahood19:07:35

Am I right that this should be working? Build is newer than 192.5728.74 which was on the mailing list post, but I'm not sure if I'm on early access or not...

cfleming21:07:52

@shaun-mahood Yes, that should be working - please send a mail or leave some details here and I’ll investigate.

shaun-mahood22:07:26

Ok, I've sent the details and log file through email. Thanks!

octahedrion13:07:37

I'm also having issues with deps.edn projects since upgrading to 2019.2 today - my Run-configurations for deps.edn-based REPLs don't work

SgtZdog19:07:08

Is the cursive eap compatible with intellij 2019.2? I'm using the release build right now and it's flagged as incompatible.

kanwei20:07:37

@shaun-mahood yup same issue here, had to downgrade

manutter5120:07:18

Just updated intellij to 2019.2 and got the latest EAP Cursive, and my REPL won’t start, keeps saying, “No external project path found for <project>“. Not sure how to proceed from here.

manutter5120:07:39

It’s a deps.edn-based project, if that matters.

dnolen20:07:54

everybody's having the same issue it seems including myself - just have to downgrade for now

SgtZdog21:07:28

I've re-installed 2019.1.3 and am still trying get the debugger working. so far, my attempts have not yielded any icons in the gutter. When you say > you need to start a repl with the leiningen profile what script should I point the run configuration at? right now I have it pointing to the root script in my tests folder

salam21:07:40

sorry for the confusion caused by my usage of the overloaded world "profile". what i meant is the "Run with Leiningen" option on the run configuration pop-up dialog.

salam21:07:03

you don't need to put anything in the "Profiles:" input box. you may leave everything with their default selection/value and just hit "Run". that is: Which type of REPL to run: nREPL How to run it: Run with Leiningen Module: <your root module should be automatically selected here, if not select it manually>

salam21:07:57

this is just getting a regular REPL up and running, there's nothing test-specific here.

SgtZdog22:07:59

How do I use that to run the tests in the leiningen generated test folder (with breakpoints)?

salam01:07:30

1) start a debug repl as described here: https://cursive-ide.com/userguide/repl.html#starting-a-debug-repl 2) load a test namespace by following the steps shown here: https://cursive-ide.com/userguide/repl.html#interaction-with-the-editor 3) run your tests in that namespace by following the steps shown here: https://cursive-ide.com/userguide/testing.html

SgtZdog12:07:04

Thank you @UDCGPTV9R! I spent far too long trying to grock how to do this. I had to 'Run X in REPL' to get the gutter icons to appear on what had and had not passed, but I was able to both include the ns/files and run the tests and call the functions in the repl! TY very much! (I also found that you can right click in the file to get the REPL commands rather than having to go up to the Tools dropdown.)

🎉 4
salam17:07:34

you're welcome, @kevin.zemon. i'm glad to be of help!

SgtZdog17:07:56

Any ideas on the new problem I posted?

SgtZdog21:07:24

Nevermind... I was looking at a different run config. nREPL run config doesn't have a script option

SgtZdog21:07:17

So now that I'm looking at the right run config, I'll try to describe again: REPL is set to nREPL "How to run it" is "Run with Leiningen" and the leiningen/deafult is a selected profile Module is set to the root project module

SgtZdog21:07:55

If I replace leiningen/default with leiningen/test, i get an exception complaining that it can't find nrepl.server

salam00:07:20

this is not necessary and might cause problems. what we are doing here is just setting up a regular repl run configuration. leave the “Profiles:” input box empty.

salam00:07:31

once the regular run configuration is created, use it to start a debug session: (menu bar) -> Run -> Debug... -> (choose the repl run configuration) and after that, you’ll have a repl that’s running in the debug mode. from there on, you can switch to the test namespace, load that namespace, mark breakpoints, and run tests in the repl.