Fork me on GitHub
#clojurescript
<
2022-10-25
>
mikethompson06:10:43

Does anyone have any experience working with the AsyncIterable inteface in JS. The JS way is to use for await of I've found this previous question/answer (link below) from a year ago which is helpful ... but, before going on, I was wondering if there are any other useful resources out there (battle-tested macros)? https://ask.clojure.org/index.php/10896/how-to-work-with-asynciterable-interface-in-cljs

tord09:10:16

Hi, all! I'm not entirely sure which channel is the right one for this, but I have a problem: I have a Clojure/ClojureScript project that works well on my Intel MacBook Pro, but when I try to fire up lein figwheel on my ARM Mac Studio, I get the following error: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/m6/ymn8mv255f384_nbxf4t6r7w0000gn/T/jna13795249324639961895.tmp That file doesn't even exist on my machine. Because it's obviously supposed to be just some sort of temporary file, I've tried doing lein clean, but the result is still the same. Why is the compiler looking for this file, and what can I do to solve the problem?

p-himik10:10:28

First, I'd try to understand what exactly is trying to load that file. There should be a full stack trace somewhere.

Ferdinand Beyer12:10:11

Many Java libraries bundle native shared libraries, such as databases. JNA is a technology that makes this easier. Not an expert, but I think this means that the Java library will bundle shared libs for multiple operating systems/architectures, copy those to the file system, and then instruct the OS/JVM to load these. In your case, it seems you have a dependency to such a library that bundles an Intel version but not an ARM one, and loading the Intel lib on a ARM machine will not work. You probably need to update or change this dependency.

Ferdinand Beyer12:10:01

I think this file did indeed exist, but since it is a temporary file it is automatically deleted when the JVM exits, so you can’t see it anymore after the JVM crashed.

thheller17:10:20

you need to upgrade your dependencies. not sure the if figwheel has a release that supports M1 but it should

thheller17:10:26

jus trying the latest figwheel. most likely the problem is coming from the hawk library used for file watching

thheller17:10:47

I think only fighwheel-main has a fix but not sure

martinklepsch15:10:16

Hey — I’m looking for documentation or examples of extending the clojure.test/is macro for more bespoke assertions. In particular would love to see some examples of this + ClojureScripts’ async test helper…