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

"could not resolve symbol array" triggered in viewer #250

Closed
sritchie opened this issue Oct 29, 2022 · 2 comments
Closed

"could not resolve symbol array" triggered in viewer #250

sritchie opened this issue Oct 29, 2022 · 2 comments

Comments

@sritchie
Copy link
Collaborator

I tried to get around #249 by using array and js-obj directly. The latters works, but attempting to use the array function in a viewer:

(clerk/with-viewer
  '(fn [_]
     (v/html
      [:div "error: " (str (array 1 2 3))]))
  "")

Triggers the following error:

unusable viewer `nil`, value `#error {:message "error in render-fn: Could not resolve symbol: array", :data {:render-fn (fn [_] (v/html [:div "error: " (str (array 1 2 3))]))}, :cause #error {:message "Could not resolve symbol: array", :data {:type :sci/error, :line 1, :column 82, :message "Could not resolve symbol: array", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 45, :ns #object[CT user], :file nil} {:line 1, :column 53, :ns #object[CT user], :file nil} {:line 1, :column 53, :ns #object[CT user], :file nil, :sci.impl/f-meta nil} {:line 1, :column 77, :ns #object[CT user], :file nil} {:line 1, :column 77, :ns #object[CT user], :file nil, :sci.impl/f-meta {:name str, :arglists ([] [x] [x & ys]), :doc "With no args, returns the empty string. With one arg x, returns\n x.toString(). (str nil) returns the empty string. With more than\n one arg, returns the concatenation of the str values of the args.", :sci/built-in true, :ns #object[CT clojure.core]}} {:line 1, :column 82, :ns #object[CT user], :file nil})}], :file nil, :phase "analysis"}, :cause #error {:message "Could not resolve symbol: array", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase "analysis"}}}}`

cc @borkdude

@borkdude
Copy link
Collaborator

borkdude commented Oct 29, 2022

Fixed with babashka/sci@a766b73. As soon as @mk bumps SCI here then it will be available in clerk as well.

As a workaround you can do (js/Array. 1 2 3) for now.

@mk mk closed this as completed in 214c611 Oct 29, 2022
@sritchie
Copy link
Collaborator Author

Thank you!

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

No branches or pull requests

2 participants