membrane

2025-06-11T15:53:46.453019Z

I'm trying to hack on clobber (though clobber is irrelevant here I think) in a project, this is a simplified deps.edn for this repro

{:deps
 {
  ;from easel
  com.phronemophobic/membrandt {:git/sha "66da338b158a58ef48bc3a17ebe25a98e1b11716"
                                :git/url ""
                                :exclusions [com.phronemophobic.membrane/skialib-linux-x86-64]}
  com.phronemophobic/viscous {:mvn/version "1.3.5"}

  com.phronemophobic/membrane {:git/sha "6e5b0473b3efda978e24876f241f30fcae5a5990"
                               :git/url ""
                               }

  com.phronemophobic.membrane/skialib-linux-x86-64 {:mvn/version "0.17-beta"}
  }}
When I try this (triggering an event on the membrandt component. This is supposed to work right?):
(require '[com.phronemophobic.membrandt :as ant]
         '[membrane.ui :as ui])

(-> (ant/button {:text     "hi"
                 :on-click (fn [] [[::btn-click "data"]])})
    (ui/key-press "a"))
I get:
InvocationTargetException 
	jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance (DirectConstructorHandleAccessor.java:74)
	java.lang.reflect.Constructor.newInstanceWithCaller (Constructor.java:501)
	java.lang.reflect.Constructor.newInstance (Constructor.java:485)
	tech.v3.datatype.ffi/instantiate-class (ffi.clj:406)
	tech.v3.datatype.ffi/instantiate-class (ffi.clj:399)
	tech.v3.datatype.ffi/instantiate-library (ffi.clj:541)
	tech.v3.datatype.ffi/instantiate-library (ffi.clj:538)
	tech.v3.datatype.ffi.LibrarySingleton (ffi.clj:653)
	tech.v3.datatype.ffi.LibrarySingleton (ffi.clj:657)
	membrane.skia.paragraph/eval32264/fn--32267 (paragraph.clj:111)
	clojure.lang.Delay.realize (Delay.java:44)
	clojure.lang.Delay.deref (Delay.java:59)
Caused by:
UnsatisfiedLinkError Error looking up function 'skia_ParagraphStyle_setTextHeightBehavior': /home/linuxbrew/.linuxbrew/bin/java: undefined symbol: skia_ParagraphStyle_setTextHeightBehavior
	com.sun.jna.Function. (Function.java:255)
	com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:618)
	com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:594)
	com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:580)
	com.sun.jna.Native.register (Native.java:1900)
	tech.v3.datatype.ffi.jna.G__39594. (:-1)
	jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance (DirectConstructorHandleAccessor.java:62)
	java.lang.reflect.Constructor.newInstanceWithCaller (Constructor.java:501)
I'm on linux. Anything obvious stick out here that I'm missing? I've been able to get the clobber cloure-mode ui running in skia and things generally seem to work besides this

phronmophobic 2025-06-11T16:00:40.202469Z

I've been making updates to several libraries like membrane, easel, and clobber. Some of the changes haven't been released yet.

phronmophobic 2025-06-11T16:01:17.300029Z

I can probably push the latest skialib changes to see if that helps.

2025-06-11T16:02:10.947599Z

gotcha, I figured it was something like that just wanted to check in. If you push the latest I'll try it out!

phronmophobic 2025-06-12T16:36:20.161729Z

Ok, I was able to reproduce the error on linux cloud instance. It should be fixed now with the latest membrane. I was able to get it to work with these deps:

{:deps
 {com.phronemophobic/membrandt {:git/sha "66da338b158a58ef48bc3a17ebe25a98e1b11716"
                                :git/url ""
                                :exclusions [com.phronemophobic.membrane/skialib-linux-x86-64]}

  com.phronemophobic/viscous {:mvn/version "1.3.5"}

  com.phronemophobic/membrane {:git/sha "b9bbffa6546b855761097af371c32b7ba61dbe6b"
                               :git/url ""}

  com.phronemophobic.membrane/skialib-linux-x86-64 {:mvn/version "0.18-beta"}

  com.phronemophobic/clobber {:git/url ""
                              :git/sha "0ac3fd9242f1c9b52689d1a9b5d67a4419a38153"}}}

phronmophobic 2025-06-12T16:36:45.509739Z

I think this was the particular problem you were running into, https://github.com/phronmophobic/membrane/commit/b9bbffa6546b855761097af371c32b7ba61dbe6b

2025-06-12T16:46:18.740849Z

Awesome, just confirmed it work with those deps, thanks so much for that!

1
phronmophobic 2025-06-12T16:47:49.892709Z

Just fyi, all the clobber stuff (and membrandt) is still very alpha

2025-06-12T17:24:44.102719Z

yup totally understood!