Fork me on GitHub
#cursive
<
2022-07-13
>
scarytom16:07:02

I noticed that there are thousands of files in my tmp directory of the form system-deps1234.edn that are being produced by the IntelliJ process. I assume this is a by-product of something Cursive is doing? I know they aren't harmful, but I'm intrigued as to why hundreds seem to be added every day.

Jeffrey Bay19:07:33

i'm on a mac, so probably slightly different environment, but I don't experience this behavior. I would suspect that you have something in your specific setup that is causing it?

Jeffrey Bay19:07:05

Have you tried creating an empty intellij/cursive project and seeing if it still happens?

Jeffrey Bay19:07:30

if not, you could binary chop parts back in to see if you can figure out what is actually causing it

Jeffrey Bay19:07:57

I'm using cursive in an SOA type project with 20+ individual intellij project files, btw, and I have none of these files at all. I did reboot yesterday, so it would only be files generated from my cursive usage today, but I've been working all day...

scarytom21:07:52

interesting. Thanks for looking Jeffrey. I've asked a few of my colleagues and they all see these files, so I suspect it is something to do with our project configuration.

cfleming23:07:26

@UCQV87CN7 Are you using the “Use tools.deps directly” option? I think what’s happening is that Cursive has to pull the system deps file out of the deps jar, and it puts it in a temporary file. It’s possible those are not cleaned up correctly - I’ll check. But you can delete them with no ill effects.

scarytom22:07:13

No, I'm not using that option @U0567Q30W

cfleming23:07:40

Interesting, thanks. I’ll investigate that.

scarytom10:07:26

What's strange is quite how prolific these are. I have 4 clojure projects open in IntelliJ, but right now I'm not actively working in the IDE at all (just reading email in another window) yet another 25 edn files have been written in the last 5 minutes! If it helps, I've attached one of the files.

cfleming22:07:10

Right, that’s the system deps.edn file, which is extracted from the deps jar. I’ll check when those are generated, I thought I was creating a stable path for them but it looks like I’m not.

👍 1
scarytom21:07:01

Did you discover anything interesting?

cfleming23:07:03

So, I’m not creating a stable path for them, I just create a temporary file. However, deleteOnExit() is called on them - does closing IntelliJ tidy them up?

cfleming23:07:13

Still not a great solution, of course.

cfleming23:07:52

Answering my own question, it looks like they are cleaned up correctly on process exit (at least on my macOS machine), but it’s probably a better idea to clean them up earlier.

scarytom20:07:41

Yes, they do seem to vanish if I close IntelliJ... I just never do that. Thanks for looking into this

cfleming21:07:46

I’ve made a change such that there’s only one file created per version of deps in use. That will still hang around until you close the IDE, but you’ll probably only have a couple of them at any one time.

scarytom13:07:29

That's great, thanks

cfleming05:08:27

This is out in the new EAP.

👍 1