(CLJS) excluded bounded-count in use in cljs.core.async


  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:


With ASYNC-171, bounded-count was excluded. But, it is actually being used in cljs.core.async/to-chan here:

It has evidently been in use (inadvertently incorrectly) since 2013 (well prior to it having been added as a core function), with it picking up a previous private definition that had existed in cljs.core all along (but with the arguments reversed, evidently fortuitously without breaking things completely).

Here is a REPL transcript illustrating the regression that ASYNC-171 causes:

ClojureScript Node.js REPL server listening on 52771
To quit, type: :cljs/quit
cljs.user=> (require 'cljs.core.async)
WARNING: Use of undeclared Var cljs.core.async/bounded-count at line 395 file:/Users/mfikes/Projects/core.async/target/core.async-0.1.0-SNAPSHOT.jar!/cljs/core/async.cljs
WARNING: Use of undeclared Var cljs.core.async/bounded-count at line 395 .cljs_node_repl/cljs/core/async.cljs
cljs.user=> (cljs.core.async/to-chan [])
TypeError: Cannot read property 'call' of undefined
    at cljs$core$async$to_chan (/Users/mfikes/Projects/clojurescript/.cljs_node_repl/cljs/core/async.js:3042:70)
    at repl:1:113
    at repl:9:3
    at repl:14:4
    at Object.exports.runInThisContext (vm.js:54:17)
    at Domain.<anonymous> ([stdin]:41:34)
    at (domain.js:221:14)
    at Socket.<anonymous> ([stdin]:40:25)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)

You can also presumably see this if you run the ClojureScript core.async unit tests. In particular the cljs.core.async.pipeline-test namespace makes use of to-chan. (I say presumably—I haven't figured out how to run them in JVM ClojureScript, but ran the same in self-hosted ClojureScript and discovered this regression running these unit tests with the fork of core.async for self-hosted ClojureScript here:


There are no comments yet on this issue.


Vote (0)
Watch (1)


  • Created: