Fork me on GitHub
#cursive
<
2024-01-04
>
Karol Wójcik13:01:41

Hello! @cfleming I saw somewhere in repros of yours a really cool macro called defclass. Is it available somewhere publicly?

cfleming21:01:48

Hi Karol, this is actually in a fork of Clojure that I run. The design doc for the change is here: https://docs.google.com/document/d/1OcewjSpxmeFRQ3TizcaRRwlV34T8wl4wVED138FHFFE/edit?usp=sharing, and the code is here: https://github.com/cursive-ide/clojure/tree/defclass

Karol Wójcik09:01:33

Thank you so much. This looks very promising. Happy new year 🎊

markaddleman14:01:08

Does cursive or intellij alter how the runtime interacts with classloaders? I have two deps.edn projects: parent and child. The parent deps.edn declares the child as a dependency using git url & sha. For development purposes, the parent defines an alias which declares the child as a :local/root for the child using :override-deps . For development, the project project uses a cursive run config nREPL and the IntelliJ project classpath. Here’s the problem: When I run the project using the alias declaring child as :local/root and the runner, I get an error class datascript.db.DB cannot be cast to class datascript.db.DB (datascript.db.DB is in unnamed module of loader clojure.lang.DynamicClassLoader @163e13ef; datascript.db.DB is in unnamed module of loader 'app'). More info in thread

markaddleman14:01:42

When I run the project using a remote runner connecting to nREPL, there is no problem.

markaddleman14:01:08

When I change the run config to use Run with Deps, there is no problem.

cfleming21:01:06

Is this project publicly available so I could look at it? Cursive uses deps.clj under the hood these days, but that shouldn’t affect how the app itself is run (it can affect reading the project config).

cfleming21:01:18

Which version of Cursive are you using?

markaddleman21:01:01

I’m running 1.13.1-2023.3 on IJ 2023.3.2

markaddleman21:01:37

The project is not public but I can try to create a repro repo (that’s a fun alliteration!) this weekend

cfleming21:01:56

That would be really useful to make sure I’m testing the right thing.

markaddleman21:01:09

Certainly. I’ll try to get to it this wekeend

cfleming21:01:18

Great, thanks!