Skip to content

Bug: read-handler with multiple arities breaks #49

Open
@galdre

Description

Description

If a read-handler function has more than one arity, transit-cljs/read attempts to call the incorrect arity when deserializing.

If the incorrect arity happens to be defined, this can lead to bizarre errors originating far from the transit code or top-level constructor; if not defined, it results in "Error: Invalid arity: X".

I discovered this by using partial to define a read handler, which of course constructs a function with many arities. The extra argument being passed to the function appears to be a Transit$TaggedValue, defined in transit-js.

Steps to Reproduce

Use a read-handler function with more than one arity. A complete minimal example, based on the official tutorial, can be found here:

https://gist.github.com/galdre/cc875e28590d253b2c40cdfd3f5ecd07

Activity

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

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