graalvm

mkvlr 2023-09-27T12:51:02.473219Z

trying to use https://central.sonatype.com/artifact/org.graalvm.polyglot/js according to https://www.graalvm.org/latest/reference-manual/embed-languages/. Anyone spot my mistake here?

clj -Sdeps '{:deps {org.graalvm.polyglot/js {:mvn/version "23.1.0"}}}'
Error building classpath. Could not find artifact org.graalvm.polyglot:js:jar:23.1.0 in central ()

mkvlr 2023-09-27T12:58:19.906419Z

or are they using some maven features that tools.deps does not support? It does download some pom files initially…

Alex Miller (Clojure team) 2023-09-27T13:02:58.479889Z

tools.deps only supports the jar package type - is that something else?

Alex Miller (Clojure team) 2023-09-27T13:04:34.520179Z

Yeah that’s a pom artifact

Alex Miller (Clojure team) 2023-09-27T13:07:23.324589Z

Essentially same as this issue https://ask.clojure.org/index.php/10892/add-support-for-bom-bill-of-materials-dependencies?show=10892#q10892

borkdude 2023-09-27T13:13:26.054329Z

@mkvlr so it seems listing deps explicitly would work?

mkvlr 2023-09-27T13:14:00.447879Z

maybe? I know nothing about pom deps so I don’t know where to start

borkdude 2023-09-27T13:14:18.280039Z

I read the ask issue and saw it there

borkdude 2023-09-27T13:14:53.490219Z

Perhaps use mvn deps tree or whatever their command is and then insert those deps in your deps.edn

borkdude 2023-09-27T13:15:16.732999Z

Or look up on mvn central what their transitive deps are

mkvlr 2023-09-27T13:24:11.641269Z

ok, so {:deps {org.graalvm.js/js-language {:mvn/version "23.1.0"}}} works

mkvlr 2023-09-27T13:08:40.684189Z

@alexmiller thanks a lot, also for StrangeLoop, I had a great time! 🙏

👍 3
Dumch 2023-09-27T21:41:29.017109Z

Does anyone have a simple example how to build executables for all the platform (osx, windows, linux)?

borkdude 2023-09-27T21:51:43.665319Z

jet is a pretty simple project which builds for all platforms: https://github.com/borkdude/jet

💡 1
🙏🏻 1
borkdude 2023-09-27T21:52:06.734259Z

babashka and clj-kondo are two others that are available for all platforms

Ingy döt Net 2023-09-27T22:40:45.844349Z

There's no cross compilation. They suggest using GHA.

Ingy döt Net 2023-09-27T22:43:05.740849Z

https://github.com/oracle/graal/issues/407

borkdude 2023-09-28T06:34:30.427609Z

GHA is fine but... it doesn't support aarch64 last time I checked (linux nor mac). Also the hardware is a bit slower than other platforms (circleci, cirrus). It is easy to setup though, so there's a lot to be said for it

Dumch 2023-09-30T23:21:29.223729Z

I was able to build both arm64 and x86-64 with this https://github.com/marketplace/actions/cross-platform-action#architectures

Ingy döt Net 2023-09-30T23:24:46.970139Z

Did you need to supply your own runner(s)?

Ingy döt Net 2023-09-30T23:25:39.826749Z

That action looks pretty cool.

Dumch 2023-09-30T23:25:52.223689Z

No, I did nothing. I just googled out actions that I could use, and It worked immediatelly

🙌 1
borkdude 2023-10-01T07:30:53.828759Z

I beter is based on qemu which is crap slow