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

repl error on using google closure function #222

Closed
0xqd opened this issue Aug 27, 2015 · 3 comments
Closed

repl error on using google closure function #222

0xqd opened this issue Aug 27, 2015 · 3 comments

Comments

@0xqd
Copy link

0xqd commented Aug 27, 2015

I try this simple function in repl but it doesn't seem to work.

(require '[goog.string :as gstring])
(require 'goog.string.format)

(goog.string.format "%05d" 123)

Stack trace

#object[TypeError TypeError: goog.string.format is not a function]
          (resources/public/js/test/out/eval at figwheel$client$utils$eval_helper (figwheel/client/utils.js:110:13), <anonymous>:1:101)
          (resources/public/js/test/out/eval at figwheel$client$utils$eval_helper (figwheel/client/utils.js:110:13), <anonymous>:9:3)
          (resources/public/js/test/out/eval at figwheel$client$utils$eval_helper (figwheel/client/utils.js:110:13), <anonymous>:14:4)
         figwheel$client$utils$eval_helper (jar:file:/Users/namename/.m2/repository/figwheel/figwheel/0.3.7/figwheel-0.3.7.jar!/figwheel/client/utils.cljs:47:5)

I have tried the same thing on node repl, it seems to work well. I don't know what is the problem :-?

@bhauman
Copy link
Owner

bhauman commented Aug 27, 2015

As far as I can tell this is a general Clojurescript question please use clojurians on slack or #clojurescript on irc for questions like these.

In the example above you would use (gstring/format ...)

On Aug 27, 2015, at 3:08 AM, Dung Quang notifications@github.com wrote:

I try this simple function in repl but it doesn't seem to work.

(require '[goog.string :as gstring])
(require 'goog.string.format)

(goog.string.format "%05d" 123)
Stack trace

#object[TypeError TypeError: goog.string.format is not a function](resources/public/js/test/out/eval at figwheel$client$utils$eval_helper %28figwheel/client/utils.js:110:13%29, :1:101)
(resources/public/js/test/out/eval at figwheel$client$utils$eval_helper (figwheel/client/utils.js:110:13), :9:3)
(resources/public/js/test/out/eval at figwheel$client$utils$eval_helper (figwheel/client/utils.js:110:13), :14:4)
figwheel$client$utils$eval_helper (jar:file:/Users/namename/.m2/repository/figwheel/figwheel/0.3.7/figwheel-0.3.7.jar!/figwheel/client/utils.cljs:47:5)

Reply to this email directly or view it on GitHub.

@0xqd
Copy link
Author

0xqd commented Aug 28, 2015

hmm, I can see that figwheel does use the repl from clojurescript. I will investigate further to see if I can find anything.
gstring/format and goog.string.format both would work without any problem.

@bhauman
Copy link
Owner

bhauman commented Sep 11, 2015

This appears to be working now in the latest Figwheel.

@bhauman bhauman closed this as completed Sep 11, 2015
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