Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: read-handler with multiple arities breaks #49

Open
galdre opened this issue May 14, 2019 · 0 comments
Open

Bug: read-handler with multiple arities breaks #49

galdre opened this issue May 14, 2019 · 0 comments

Comments

@galdre
Copy link

galdre commented May 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant