Fork me on GitHub
#cursive
<
2019-09-17
>
cfleming04:09:26

@kenny I’m interested whether this helps with the branch switching.

kenny04:09:54

I’ll check it out tomorrow!

kenny14:09:12

Kind of. It seems like the modules should be tied to the branch. Take the following situation: if I have branch A with Module1 and branch B with Module2 and I'm in branch A. When I switch to branch B, Module1 will be removed, as expected. When I switch back to branch A, I need to add Module1 again.

cfleming00:09:02

That should happen, I think, assuming Module A is managed by Deps/Lein

kenny00:09:59

It didn't for me. The module stayed removed when switching back to branch A.

cfleming00:09:47

I’ll check that. It should definitely come back after syncing the project.

cfleming01:09:34

Just checking - you have your clojure-deps.xml file checked in, right? So that will be updated when you switch branches?

kenny01:09:04

No. What is that?

cfleming01:09:53

That’s .idea/clojure-deps.xml, which is the config file telling deps which projects are registered with the IDE.

kenny01:09:22

Oh. Is that supposed to get checked in?

cfleming01:09:56

Yes, because otherwise there’s no way for Cursive to know which projects are registered in each branch.

cfleming01:09:52

If you do that, then I think your modules will be correctly updated when you switch.

cfleming01:09:04

I need to write a section in the doc about this, actually.

kenny01:09:03

Huh, interesting. I’ll add that in tomorrow.

cfleming01:09:05

Lein/Deps are in the same category as Gradle or Maven in that discussion, and I’d recommend excluding the same files for them too.

kenny01:09:54

Gotcha, didn’t know about that. Thanks.

rarous05:09:47

@cfleming I can confirm that latest Cursive DEV with 2019.2.3-EAP fixed that problem.

ikitommi08:09:37

Would it possible to make a different color target for qualified keywords?

ikitommi08:09:09

have a convention in libraries that simple keywords are used by the lib, client-specific keys should be qualified. would help differentiate those.

👍 16
kenny15:09:56

When a module fails to resolve, it removes/disables all modules in the projects. I got the below exception after adding a dependency which caused most of my modules to get removed. It's a bit jarring to have that happen. Changing the dep version to one that actually exists brings the modules back though.

cfleming00:09:17

Hmm, I see - I’ll try to fix that.

cfleming00:09:55

At a minimum the modules that resolve correctly should appear. Unfortunately Deps is a bit all-or-nothing here, I just get a “something didn’t work” exception for a given project.

kenny00:09:54

Yeah, the other modules stay. This was a "core" library (e.g., a logger) which basically everything depends on.

cfleming00:09:10

Ah, ok. I’m not sure I can do much about that, since if there’s an exception I get no dependency information back from deps at all. What I might be able to do is at least add the modules and its source paths etc, and somehow show the error message against the module in the toolwindow.

kenny00:09:12

What about using the last valid resolve until the next one is valid?

kenny00:09:25

And marking the module as invalid somehow.

cfleming00:09:25

Possibly, I’d have to check whether that’s possible, but it sounds like the best idea.

cfleming01:09:56

Yeah, looking at the code, tools.deps just aborts the whole resolve when it encounters a problem.

kenny01:09:02

That probably makes sense in general. If something can’t be resolved and you were to continue, you may get a strange result.

cfleming09:09:28

This is what this looks like now. After resolution you’ll get a single notification with all the resolution errors found (rather than one notification per error as previously). The module will still appear and source dirs etc will be correct, it’ll just have no deps. You’ll be able to see the error in the toolwindow as shown.

👍 8
kenny13:09:59

That's great!

dazld19:09:39

I’d like to try out the new intelliJ and cursive builds - can I run them in parallel with my old 2018.3 installation? (macOS)

rarous19:09:19

sure

👍 4
rarous19:09:07

2019.2.3-EAP+Cursive Snaphot3 looks like viable

rarous19:09:06

When you drag new version to Applications select Keep Both and you will have side by side Ideas

dazld19:09:37

:thumbsup:

dazld20:09:30

https://www.jetbrains.com/idea/nextversion/ 2019.3 is the only EAP I can find - am I missing something?

rarous20:09:55

they changed it today

dazld20:09:34

I have mixed leiningen and deps modules in my project - I can’t seem to make repl configs for the deps modules, only the leiningen modules appear.

dazld20:09:15

nm! all appeared now!

dazld20:09:20

took an age to index

cfleming09:09:28

This is what this looks like now. After resolution you’ll get a single notification with all the resolution errors found (rather than one notification per error as previously). The module will still appear and source dirs etc will be correct, it’ll just have no deps. You’ll be able to see the error in the toolwindow as shown.

👍 8