some promising results from a heap analyzer mcp project i found. I added a few operations it thought were prudent, and then let it evaluate clojure scripts, and it’s a really nice way to analyze heap dumps. Pretty close to being able to run a repl against the heap itself
here’s the skill. it’s got some local stuff hardcoded and work stuff in it https://github.com/dpsutton/heap_mcp_nb/blob/feature/clojure-eval/SKILL.md Example of exploration Just casually chatting with a heap dump. It is incredible
It looks nice - thanks for sharing!
I have a ~/.clojure/deps.edn which loads a Clojure file to set some vars the way I like them. In particular it sets *print-length* to 50, because I got tired of accidentally blowing up my REPL with giant data.
This breaks the clojure.repl.deps helpers (`add-lib` and sync-deps), which shell out to clj -T:deps - and I presume try to read the response. The truncated output that print gives you when *print-length* is exceeded is not readable, so it throws.
My question is: should the clojure.repl.deps helpers use -Srepro ? I am struggling to see a use case where you would need or want to load a user deps.edn for this shelling-out.
If it was enough for you to restrict print-length only in nREPL contexts, then you might want to look at https://nrepl.org/nrepl/usage/server.html#dynamic-var-defaults I gather from your responses that it probably won't be enough, no, but maybe still useful to know about this.
I have a lot of dev tooling in my user deps.edn so being able to call sync-deps with :aliases to load that dev tooling into a running REPL is very useful. That way I can add it as needed to any project, without needing those tools in each project's deps.edn files.
Could you put whatever code-loading you have in your user deps.edn behind an alias, and use that when you start your REPL, which then would not affect sync-deps etc?
FWIW, I use a repl shell script (in ~/bin) to start my REPLs everywhere and it uses a string of aliases like so: https://github.com/seancorfield/dot-clojure/blob/develop/bin/repl#L14
I have found it trickier than expected to get every tool that I might use to start a REPL to use a specific alias (there are various editor integrations that like to start the REPL themselves, scripts written by colleagues who don't know about my personal aliases, etc.).
I thought there was a bug report about this recently