core.async

go macro removes binding forms that are intialized with logical false value

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    org.clojure/core.async "0.1.346.0-17112a-alpha"
  • Approval:
    Triaged

Description

(require '[clojure.core.async :as a])

(a/go (let [a nil] (a/alts! (if a <whatever> <whatever>)))) // Unable to resolve a
(a/go (let [a nil] (a/<! (if a <whatever> <whatever>))) // Unable to resolve a

Seems that 'go' macro removes falsely initialized symbols that are used as channels, because
in both cases there's exception, that says " Unable to resolve symbol: a in this context".

Activity

Hide
Willy Blandin added a comment -

Confirmed.
Bug was introduced between 0.1.278.0-76b25b-alpha and 0.1.295.0-9ea6ef-alpha.

Show
Willy Blandin added a comment - Confirmed. Bug was introduced between 0.1.278.0-76b25b-alpha and 0.1.295.0-9ea6ef-alpha.
Hide
Willy Blandin added a comment -

Worked around with:

(defmacro workaround-async-92
  "Hack to workaround core.async bug
   cf. http://dev.clojure.org/jira/browse/ASYNC-92"
  []
  ;; has to be a list
  `(do nil))

(let [a (workaround-async-92)]
  ...)
Show
Willy Blandin added a comment - Worked around with:
(defmacro workaround-async-92
  "Hack to workaround core.async bug
   cf. http://dev.clojure.org/jira/browse/ASYNC-92"
  []
  ;; has to be a list
  `(do nil))

(let [a (workaround-async-92)]
  ...)
Hide
Leon Grapenthin added a comment -

modifies two methods of the RawCode inst so that they check:collected-locals in locals via contains? before ignoring them

Show
Leon Grapenthin added a comment - modifies two methods of the RawCode inst so that they check:collected-locals in locals via contains? before ignoring them
Hide
Ghadi Shayban added a comment -

Hi Leon, thanks for the patch. Can you fill out a Contributor Agreement? http://clojure.org/contributing

Show
Ghadi Shayban added a comment - Hi Leon, thanks for the patch. Can you fill out a Contributor Agreement? http://clojure.org/contributing
Hide
Leon Grapenthin added a comment -

I did, yesterday. Got an automatic confirmation email saying Rich Hickey signed it. Anything else I should do with it?

Show
Leon Grapenthin added a comment - I did, yesterday. Got an automatic confirmation email saying Rich Hickey signed it. Anything else I should do with it?

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated: