While I'm digging around (I'm trying to debug my port of this to cherry!):
Issue 1:
release-current-resources doesn't actually return exceptions (just logs them), despite docstring noting that "Returns any exceptions that happened during release".
Repro 1:
clj -Sdeps '{:deps {techascent/tech.resource {:mvn/version "5.09"}}}' -M -e "(require (quote [tech.v3.resource.stack :as s])) (binding [s/*bound-resource-context?* true] (s/track (Object.) (fn [] (throw (ex-info \"boom\" {}))))) (println \"release-current-resources returned:\" (pr-str (s/release-current-resources)))"
Output 1:
clj -Sdeps '{:deps {techascent/tech.resource {:mvn/version "5.09"}}}' -M -e "(require (quote [tech.v3.resource.stack :as s])) (binding [s/*bound-resource-context?* true] (s/track (Object.) (fn [] (throw (ex-info \"boom\" {}))))) (println \"release-current-resources returned:\" (pr-str (s/release-current-resources)))"
#object[java.lang.Object 0x46cb98a3 "java.lang.Object@46cb98a3"]
Apr 18, 2026 8:41:15 AM clojure.tools.logging$eval449$fn__452 invoke
SEVERE: Failed to release user$eval532$fn__533@b174a73
clojure.lang.ExceptionInfo: boom {}
at user$eval532$fn__533.invoke(NO_SOURCE_FILE:1)
...
release-current-resources returned: nil
Issue 2:
track has a small typo: "The dispose method must implement be Runnable, Closeable, or a clojure function." Could change to "must be Runnable, Closeable, AutoCloseable, or a Clojure function".
While I'm digging around (I'm trying to debug my port of this to cherry!):
Issue 1:
release-current-resourcesdoesn't actually return exceptions (just logs them), despite docstring noting that "Returns any exceptions that happened during release".Repro 1:
clj -Sdeps '{:deps {techascent/tech.resource {:mvn/version "5.09"}}}' -M -e "(require (quote [tech.v3.resource.stack :as s])) (binding [s/*bound-resource-context?* true] (s/track (Object.) (fn [] (throw (ex-info \"boom\" {}))))) (println \"release-current-resources returned:\" (pr-str (s/release-current-resources)))"Output 1:
Issue 2:
trackhas a small typo: "The dispose method must implement be Runnable, Closeable, or a clojure function." Could change to "must be Runnable, Closeable, AutoCloseable, or a Clojure function".