cursive

souenzzo 2025-07-04T11:24:52.490699Z

Feature Idea: Load File in REPL command in deps.edn 1. triggers Refresh Clojure Deps Project(s) 2. Uses new tools.deps functions to update our current REPL classpath

imre 2025-07-04T12:12:53.270299Z

must be an opt-out thing though 😛

imre 2025-07-04T12:13:29.968469Z

I don't use those new functions because they mess up tools.namespace reloading in some of the projects I work with

souenzzo 2025-07-04T17:25:14.756069Z

currently "Load file in REPL" simply fails

imre 2025-07-04T17:25:42.178979Z

as in across the board?

imre 2025-07-04T17:25:55.315709Z

or in some specific case?

souenzzo 2025-07-04T17:40:29.896439Z

> as in across the board? Yes > or in some specific case? Yes, in the specific case "in deps.edn file"

souenzzo 2025-07-04T17:41:06.166709Z

So you could • Do not use deps.edn on your project • Do not load deps.edn if your other tools don't like it

imre 2025-07-04T17:43:51.252959Z

Ooh I missed the deps.edn part

imre 2025-07-04T17:44:27.690749Z

Not sure I'd reuse the load file in repl command tho

imre 2025-07-04T17:44:47.923539Z

But it could be useful

cfleming 2025-07-04T22:33:14.874349Z

Thanks for the idea, I'm definitely planning to add add-libs support soon, but am still thinking about how it should work. This sounds like an interesting idea. I'm also planning to create reload functions based on what clj-reload does, which is more sophisticated than what Cursive currently does. I'll probably create new commands and make them the default, but leave the existing commands in case people really like the old behaviour. I think the new ones should hopefully work better across the board, though.

👍 1
onetom 2025-07-09T05:01:48.598529Z

the current behaviour is definitely not working intuitively, so we have ended up turning off the Load out-of-date dependencies transitively option permanently and manage the namespace reloading manually, which is a bit of drag 😞 what was especially problematic is how cursive was trying to load test files into a production server via a remote repl connection, just because im also connected to a local repl, which did load the tests, because it does have the test dir on it classpath.

onetom 2025-07-09T05:08:31.715139Z

ok, the reason im mentioning this, is because we have a "run all tests" repl action, which tries to load the current file into the repl (assuming it's a changed implementation or test file) and when freshly starting a repl, we might be standing in a deps.edn, when we 1st want to run all tests. so we see an error message like:

Loading deps.edn... Syntax error (ClassNotFoundException) compiling at (/Users/onetom/VM/ginoco/api2/deps.edn:1:1).
com.cognitect.aws

Executing 'ginoco Kaocha - run tests'
...
so it would make sense to define the Load File in REPL action for deps.edn files too, at least not to error out on them, but simply ignore doing anything with them.