Skip to content

Two small docstring issues #6

Description

@willcohen

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".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions