Fork me on GitHub
#sci
<
2021-07-01
>
hairfire17:07:15

I have an "sci" application that is also using "specter". Does "specter" work with GraalVM and "sci"? I'm getting the following when I execute the native application: Exception in thread "main" Syntax error macroexpanding clojure.core/let at (0:0). at clojure.lang.Compiler.checkSpecs(Compiler.java:6976) ... more clojure.lang stuff at com.rpl.specter.impl$closed_code.invokeStatic(impl.cljc:625) ... more com.rpl.specter and clojure.lang stuff at hmidl.semantics$get_access_levels.invokeStatic(semantics.clj:198) ... more hmidl stuff (i.e., My application) at clojure.lang.RestFn.applyTo(RestFn.java:137) at hmidl.core.main(Unknown Source) Caused by: java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath. at clojure.lang.RT.load(RT.java:462) at clojure.lang.RT.load(RT.java:424) at clojure.lang.Compiler.ensureMacroCheck(Compiler.java:6961) at clojure.lang.Compiler.checkSpecs(Compiler.java:6974) ... 53 more

borkdude18:07:54

I have tried this a long time ago, but there were some incompatibilities back then. Specter might need some special attention as it does some side-effecting stuff during macro-expansion.

borkdude18:07:07

I can re-open the issue if it's valuable to you

borkdude18:07:18

I'm getting :

class clojure.lang.PersistentArrayMap cannot be cast to class java.lang.Number (clojure.lang.PersistentArrayMap is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')
with this updated gist: https://gist.github.com/borkdude/f6abcb0ff4183df559345503cb9c621c I don't have time now but with some extra effort, might be able to figure out what's happening...

borkdude18:07:48

The compilation error you posted doesn't seem to come from sci though

borkdude18:07:56

Perhaps a reproduction git repo would be helpful

hairfire22:07:16

I've been addressing other issues, and just got back to this. Before I saw your new work on Specter, I had already removed Specter from my application, and coded a different solution. My application is working great as both a Linux and Windows native application. I need to look closer at the work you did for future reference.

borkdude22:07:25

It was quite the workaround, so it will definitely be easier to just remove specter