Fork me on GitHub
#cursive
<
2021-07-13
>
indy14:07:46

I used to be able to stretch the REPL window left or right using the Stretch to Left and Stretch to Right actions but they don't work anymore. They do work on other windows. I'm on the 1.10.2-2021.1. Can someone confirm if it is broken for them too?

imre15:07:28

They do work for me, I'm on 1.10.3-eap2-2021.1

imre15:07:56

And my repl's view mode (cogwheel) is dock pinned

indy15:07:44

Thanks for checking. Okay, this is weird, I bumped cursive to 1.10.3-eap2-2021.1. It wasn't working on a running REPL. But on a REPL window that was just connecting or on one that isn't connected, it works. It also works when I click on stretch to left from the gear icon -> Move to menu. I'm on Mac 11.4 and IntelliJ IDEA 2021.1.3 (Ultimate Edition). Will probably wait for Colin to comment on whether something is wrong with my setup.

cfleming20:07:15

What that looks like to me is that the action isn’t actually being triggered in your REPL toolwindows, since the shortcut isn’t shown below like it is with the other toolwindows. If you look under Preferences | Keymap and use the “Find Actions by Shortcut” button, do you have other actions bound to that key that might be active in the REPL toolwindow and not elsewhere?

indy02:07:49

Mmm, no REPL actions bound to it. It also doesn't work if I invoke the action, say, Stretch to Left from the Actions modal (Cmd+Shift+A), while my cursor is in the REPL window.

AJ Jaro19:07:10

In the Project Explorer I can mark a directory as a Test Sources Root . I’ve done this a few times along with Resources Root and those are periodically reset to not being marked. It’s nice to have these color coded specifically and it’d be great to have that little feature fixed Is this a Cursive or IntelliJ feature?

Jeff Evans19:07:58

Is it leiningen? This happens to me with leinengin anytime I “refresh lein project”. Similar behavior occurs in Java projects with Maven, if you “refresh Maven project”.

Jeff Evans19:07:42

I think the “right way” to deal with it is to mark those directories as being resource roots in the particular build tool. Then it won’t get wiped out on refresh.

AJ Jaro19:07:59

hmm that could be @U0183EZCD0D! I’ll keep an eye on that.

cfleming20:07:21

Right, if you’re using Leiningen, then the correct way to do it is to ensure that your directory is listed under :test-paths, either at the root or in a profile. That will mark the directory as a test root and it will be persistent. However, if you’re using deps, deps doesn’t actually have a way to mark a particular directory as a test root. In that case, Cursive will remember how you marked it and restore that state after a sync.

👍 6
salam16:07:16

> However, if you’re using deps, deps doesn’t actually have a way to mark a particular directory as a test root. In that case, Cursive will remember how you marked it and restore that state after a sync. this doesn't seem to be case, @U0567Q30W. i had just run into this problem and solved it by adding the path ("dev") to :extra-paths under an alias (`:dev`) and enabling that alias in the Clojure Deps tool window.

kendall.buchanan19:07:12

I believe you can also have it persist by doing it in here, correct?

cfleming08:07:13

@UDCGPTV9R I’m not sure we’re talking about the same thing - if I understand correctly you’re talking about adding a new source root, but I mean marking an existing source root as a test root (green instead of blue in the project view).

cfleming20:07:32

@U0HJA5ZQT No, that will only mark it in the IDE, so in general it will be overwritten by the values from the project file on the next project sync. However the above caveat about deps holds - since deps doesn’t provide a way to distinguish test roots from source roots, if you mark them in the IDE Cursive will persist that across project syncs.

salam22:07:46

oh, i'm pretty sure we are talking about the same thing: in Deps projects, directories that are manually marked as "Test Sources Root" (e.g., "test") / "Test Resources Root" (e.g., "test-resources") are unmarked upon re-opening/synchronization of the projects, unless they are explicitly listed under the :test alias in the projects' "deps.edn".

salam23:07:05

here's a demo video of this behavior:

cfleming05:07:08

You’re right, that does look like a bug, I’ll check that behaviour too.

thanks3 5