Fork me on GitHub
#cursive
<
2024-03-09
>
p-himik11:03:26

A small bug report for the latest alpha: removing the new "usages" hints by unchecking the checkbox in Editor -> Inlay Hints requires a restart. Never mind, there was a delay between the launch and the appearance of the "usages" hints. In this case, the bug report is about not being able to remove the hint at all. :)

cfleming19:03:20

This is fixed in the next EAP, they now obey the Usages setting in that Settings dialog.

Jeff Evans16:03:12

Hi, facing a weird problem where my top-level module’s src keeps getting removed as a source directory and it’s driving me nuts. Details in thread.

Jeff Evans16:03:32

Here is the project I’m working on, and this issue exists in the main branch. https://github.com/jeff303/kc-repl

Jeff Evans16:03:35

Every time I “Refresh Clojure Deps Projects” with Cursive, the main .clj source file I have under src is no longer under a source directory. If I add it manually, using the IntelliJ dialog, that works until the next time I need to refresh Deps again.

Jeff Evans16:03:18

This is IntelliJ IDEA 2023.3.4 (Ultimate Edition) with Cursive 1.13.1-2023.3

Jeff Evans16:03:49

Now, I am fully willing to accept/admit that my deps files for my project are screwed up, since I’m still learning the intricacies of handling multi-module setups. However, I’m 99% sure something this basic shouldn’t be happening. 😞

Jeff Evans17:03:30

And in traditional rubber duck style debugging, this can be disregarded. My local IntelliJ state was all screwed up from some combination of 1) misusing/abusing deps, 2) upgrading major versions a few times, 3) planetary movements I nuked all .idea dirs, .iml files I could find in the entire tree, and started over from scratch, and all is good now. 😌

Jeff Evans17:03:26

Actually, I stand corrected. It is still happening. Something to do with the multi-module setup, no doubt, as test somehow got associated with one of the submodules think_beret

imre20:03:40

Do you have your build alias ticked in the deps tool window by any chance? If yes, try without it

Jeff Evans22:03:13

Not checked in either aliases or tools aliases

Jeff Evans22:03:54

OK, yeah, it really doesn’t like that I’m bringing in the root project using the relative path, even though this is seemingly legal in deps: https://github.com/jeff303/kc-repl/blob/main/type-handlers/protobuf/deps.edn#L4 When I deselect the alias that brings these submodules in, then the problem stops happening.

Jeff Evans23:03:31

Interestingly, if I just move that to be under the :build alias instead of the root :deps then the problem is fixed too (and no other ill effect, seemingly). So I’ll go with that for now.

cfleming05:03:59

I’ll take a look at this tomorrow

octahedrion06:03:02

this happens to me whenever there's a problem resolving a dependency after refreshing deps

cfleming19:03:02

I can’t reproduce this with the latest version of your code. I have imported the project, and added the test-dependencies and type-handlers aliases. It all seems to sync correctly, and the src folder stays marked as src.

Jeff Evans19:03:22

Sorry, I should have clarified the workaround I used did fix it

cfleming19:03:34

Your setup does create cyclic dependencies between modules, which is pretty funky.

Jeff Evans19:03:51

Yeah... I'm not sure how to structure things differently

cfleming19:03:35

This is so that the sub-modules can access test code in the parent module, correct?

Jeff Evans19:03:16

Not test code anymore. I already created a new submodule for the. Really just the main source code

Jeff Evans19:03:47

This kind of thing is fairly common in Reactor (Maven) where you include subprojects which themselves depend on the parent

Jeff Evans19:03:26

Hmm. I wonder if I could just move the main source to a new submodule too

cfleming19:03:18

Yeah, generally cyclic dependencies like that are a bad idea, they’ll often cause problems but it looks like both deps and IntelliJ are handling it ok.

cfleming19:03:39

I’d try to remove them if possible though.

cfleming19:03:01

It looks like your submodules mostly need the type handler bit. Could that be broken out into a sub-module?

cfleming19:03:13

Then the main module and the submodules could depend on that.

Jeff Evans20:03:34

Excellent suggestion, thank you. And sorry for the noise