Skip to content

invoke vs. invokeStatic -> de-duplication of stacktrace frames (Clojure 1.8.0+) #14

@venantius

Description

@venantius

Changes in the Clojure compiler between 1.7 and 1.8 introduced additional stack frames on certain Clojure function calls (going from .invoke to both .invoke and .invokeStatic). For example:


    pyro.core_test/fn (core_test.clj:7)
    clojure.test$test_var$fn__7983.invoke (test.clj:716)
    clojure.test$test_var.invokeStatic (test.clj:716)
    clojure.test$test_var.invoke (test.clj:707)
    pyro.core_test$sample_failure.invokeStatic (core_test.clj:7)
    pyro.core_test$sample_failure.invoke (core_test.clj:7)

This doesn't really add much to a Pyro stacktrace other than just pointing to the same line multiple times:

    pyro.core-test/fn (core_test.clj:7)
    5    (def sample-var)
    6
--> 7    (deftest ^:demo sample-failure
    8      (is (some? (dummy-fns/i-dont-work)))
    9      "this

    pyro.core-test/sample-failure (core_test.clj:7)
    5    (def sample-var)
    6
--> 7    (deftest ^:demo sample-failure
    8      (is (some? (dummy-fns/i-dont-work)))
    9      "this

    pyro.core-test/sample-failure (core_test.clj:7)
    5    (def sample-var)
    6
--> 7    (deftest ^:demo sample-failure
    8      (is (some? (dummy-fns/i-dont-work)))
    9      "this

We might want to de-duplicate these frames since they don't really add much to someone's understanding of the trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions