is there some lib or tool in the JVM ecosystem that tries enumerating which methods in the JDK stdlib are side-effectul / side-effect-free?
@vemv GraalVM tries to analyze this to decide if static initalizers can be initialized at build time, perhaps look inside their codebase if they have some list. Not sure if they do it on the bytecode level or on a higher level.
V8 engine has it in some way When you write a function in the console, if it is side effect free, it show you the result as a preview. Anyway. I have interest too. Please share is you find something
Does anyone happen to know where aether determines the default m2 directory where to look for stuff? I have a native compilation of tools deps alpha, but somehow this location is captured at compile time
which results in weird errors like:
Caused by: java.io.FileNotFoundException: /home/circleci/.m2/repository/babashka/fs/0.0.1/fs-0.0.1.pom.part.lock (No such file or directory)
on a system that's not CI ;)clojure.tools.deps.alpha.util.maven/default-local-repo
would be my guessah, thanks!
I could probably delay that computation
that would be helpful :) I'll try in a fork
aw yeah, it works :) macOS: https://67-275632984-gh.circle-artifacts.com/0/release/tools-deps-native-0.0.1-SNAPSHOT-macos-amd64.zip linux: https://66-275632984-gh.circle-artifacts.com/0/release/tools-deps-native-0.0.1-SNAPSHOT-linux-amd64.zip usage:
./tools-deps-native '{:deps {babashka/fs {:mvn/version "0.0.1"}}}'
https://github.com/clojure/tools.deps.alpha/commit/5f0fb4f23a5e38aaaa1b13165540a63e791aaaf4
thanks!
I think I could now make this into a tools deps babashka pod so you can use the tools deps API in a babashka script, for whatever reason
but also other graal compiled tools which use tools deps should now work with this change