core.async

Metadata does not persist across go-block boundaries in Clojurescript core.async

Details

  • Type: Defect Defect
  • 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

Description

In clojurescript's version of core.async, the following should print hello, but it doesn't:

(go
  (println
    (meta
      (<!
        (let [c (chan)]
          (go
            (>! c ^:hello [42]))
          c)))))

No such difference is mentioned in https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure.

Activity

Hide
Víctor M. Valenzuela added a comment -

A more consise repro: (go (js/alert (meta ^{:id 1} [])))

This is even worse than originally reported - metadata disappears even within the same go block that creates it.

Show
Víctor M. Valenzuela added a comment - A more consise repro: (go (js/alert (meta ^{:id 1} []))) This is even worse than originally reported - metadata disappears even within the same go block that creates it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: