sci 2025-07-27

when i run (.getFileName (fs/path "my-path.clj")) in a clojure repl it works fine, but when i run the same in an SCI interpreter, it gives this error:

Method getFileName on class sun.nio.fs.UnixPath not allowed!

✅ 1

why does that happen? this shouldn't need to interact with the host filesystem, i wouldn't think?

✅ 1

You need to configure SCI for interop explicitly

Are you on the JVM or in a native image?

i am currently on the JVM but i plan to use Graal eventually

i think fs/file-name is what i want, then i don't need to worry about interop

Check babashka’s src/babashka/impl/classes.clj for bb’s classes config. Yeah it’s better to just add functions

👍 1