no.disassemble icon indicating copy to clipboard operation
no.disassemble copied to clipboard

Use with deps.edn projects?

Open mac01021 opened this issue 4 years ago • 1 comments

Can this tool be used in non-leiningen projects?

I would like to use it in my clj repl. I can include no.disassemble in deps.edn, but that does not run the process with the agent attached.
Are there instructions to do that?

mac01021 avatar Aug 22 '20 02:08 mac01021

Once you have the JAR in your local repo, you can start a REPL like this:

$ clj -Sdeps '{:deps {nodisassemble/nodisassemble {:mvn/version "0.1.3"}}}' -J-javaagent:$HOME/.m2/repository/nodisassemble/nodisassemble/0.1.3/nodisassemble-0.1.3.jar
Initializing NoDisassemble Transformer
Clojure 1.10.1
user=> (require '[no.disassemble :as nope])
nil
user=> (nope/disassemble (fn []))
"// Compiled from NO_SOURCE_FILE (version unknown : 52.0, super bit)\npublic final class user$eval360$fn__361 extends..."

Updated to use an environment variable for a command that should work everywhere.

seancorfield avatar Aug 22 '20 02:08 seancorfield