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

core.async/to-chan! does not exist error #1370

Closed
cap10morgan opened this issue Sep 21, 2022 · 1 comment · Fixed by #1371
Closed

core.async/to-chan! does not exist error #1370

cap10morgan opened this issue Sep 21, 2022 · 1 comment · Fixed by #1371

Comments

@cap10morgan
Copy link
Contributor

[ To keep development of this project going, consider sponsoring. If you are
already a sponsor, thank you! ]

0.9.162

[ Please specify which version of babashka you're using. You can find this with babashka --version. The documentation on the master branch may be ahead of the most released version. ]

macOS 12.6 arm64

[ Please specify which platform you are using babashka on, so you can test a
new binary when the issue is resolved. ]

It looks like babashka 0.9.162 embeds core.async v1.5.648, which deprecates to-chan in favor of to-chan! and to-chan!! source code.

However, when I try to run some code using to-chan! with bb v0.9.162, I get this error:

----- Error --------------------------------------------------------------------
Type:     java.lang.Exception
Message:  to-chan! does not exist
Location: /Users/wmorgan/dev/docker-clojure-master/src/docker_clojure/core.clj:2:3

----- Context ------------------------------------------------------------------
1: (ns docker-clojure.core
2:   (:require
     ^--- to-chan! does not exist
3:     [clojure.java.shell :refer [sh with-sh-dir]]
4:     [clojure.math.combinatorics :as combo]
5:     [clojure.spec.alpha :as s]
6:     [clojure.string :as str]
7:     [clojure.core.async :refer [<!! chan to-chan! pipeline-blocking] :as async]

----- Stack trace --------------------------------------------------------------
docker-clojure.core                       - /Users/wmorgan/dev/docker-clojure-master/src/docker_clojure/core.clj:2:3
user-d5d33276-0b4d-4d51-945f-bee8f8a892ae - <expr>:4:47

[ Please provide a short and to the point description of the problem ]

bb -e "(require '[clojure.core.async :refer [to-chan!]])"

[ Please provide a minimal working reproduction of the problem ]

When I run the same code with the tools.deps clojure command, it works.

[ What is the behavior you expected to see? Please provide a minimal working example ]

@borkdude
Copy link
Collaborator

This needs to be enabled in the SCI mappings in bb .

cap10morgan added a commit to cap10morgan/babashka that referenced this issue Sep 21, 2022
borkdude pushed a commit that referenced this issue Sep 21, 2022
* Map (on)to-chan!(!) core.async fns

These are recent replacements for their deprecated predecessors onto-chan & to-chan.

* Add note to changelog about #1370 fix
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

Successfully merging a pull request may close this issue.

2 participants