core.async

Opaque string representation of channels in Clojurescript core.async

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Clojurescript 1.9.542
    core.async 0.3.442

Description

In clojurescript, (str (chan)) returns the string {{"[object Object]"}}. This is different from JVM Clojure behavior per se, and more practically, it can result in hard-to-debug stack traces, such as the attached one.

The attached backtrace doesn't reach my application code, and does not show any cljs.core.async code either. Therefore it's hard to figure out that I was mishandling a channel. A nicer string representation of channels would have saved me 20 minutes of head-scratching!

Activity

Hide
Alex Miller added a comment -

It's never been worked on, but we have talked about having the ability to name or add meta to channels.

Show
Alex Miller added a comment - It's never been worked on, but we have talked about having the ability to name or add meta to channels.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: