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

Attempts in cljs to #p js/Symbols or objects containing them crash running app #20

Open
riotrah opened this issue Feb 3, 2023 · 0 comments

Comments

@riotrah
Copy link

riotrah commented Feb 3, 2023

Hi, love hashp and the work you've put into it.

I don't know if my issue ought to be strictly dealt with within hashp-land or within zprint, or if there's some user-config/error possible here. But, either way, attempts to #p (js/Symbol "foo"), or, for example, #p a ReactElement ( which is a JS obj with a Symbol value ), crash the running application, apparently once it gets to zprint:

TypeError: Cannot convert a Symbol value to a string
    at Array.join (<anonymous>)
    at push../out/cljs.core.js.cljs.core.str.cljs$core$IFn$_invoke$arity$1 (core.cljs:2934:1)
    at Object.zprint$zprint$showfn_QMARK_ [as showfn_QMARK_] (zprint.cljc:128:1)
    at zprint$zprint$fzprint_STAR_ (zprint.cljc:7566:1)
    at zprint.cljc:906:1
    at Function.zprint$zprint$fzprint_two_up (zprint.cljc:906:1)
    at push../out/cljs.core.js.cljs.core.apply_to_simple.cljs$core$IFn$_invoke$arity$6 (core.cljs:3849:1)
    at push../out/cljs.core.js.cljs.core.apply_to_simple.cljs$core$IFn$_invoke$arity$5 (core.cljs:3849:1)
    at push../out/cljs.core.js.cljs.core.apply.cljs$core$IFn$_invoke$arity$5 (core.cljs:3849:1)
    at G__29835__delegate (core.cljs:4277:1)

I could just check if something is Symbol, and elect to not place a #p on that path, but wanted to know if you had any ideas, smells, suggestions or configuration tips?

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