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
must be an opt-out thing though 😛
I don't use those new functions because they mess up tools.namespace reloading in some of the projects I work with
currently "Load file in REPL" simply fails
as in across the board?
or in some specific case?
> as in across the board? Yes > or in some specific case? Yes, in the specific case "in deps.edn file"
So you could • Do not use deps.edn on your project • Do not load deps.edn if your other tools don't like it
Ooh I missed the deps.edn part
Not sure I'd reuse the load file in repl command tho
But it could be useful
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.
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.
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.