ClojureScript

Cannot call method 'fromArray' of undefined -- Clojurescript 0.0-2030

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Environment:
    Linux 3.2.0-52-generic x86_64 GNU/Linux, java 1.7, clojure 1.5.1

Description

Clojurescript 0.0-2030

This line from compile cljs.core is causing problems:

cljs.core.PersistentQueue.EMPTY = (new cljs.core.PersistentQueue(null, 0, null, cljs.core.with_meta(cljs.core.PersistentVector.EMPTY, cljs.core.PersistentArrayMap.fromArray([new cljs.core.Keyword(null, "end-line", "end-line", 2693041432), 3820, new cljs.core.Keyword(null, "end-column", "end-column", 3799845882), 69], true)), 0));

error message: Uncaught TypeError: Cannot call method 'fromArray' of undefined.

That's the first mention of fromArray in that file. I don't know if it's an ordering problem.

Activity

Hide
John Chijioke added a comment -

I solved it by replacing [] with cljs.core.PersistentVector.EMPTY. I think this must be a reader problem.

Show
John Chijioke added a comment - I solved it by replacing [] with cljs.core.PersistentVector.EMPTY. I think this must be a reader problem.
Hide
David Nolen added a comment -

This ticket needs more details, how can this error be reproduced?

Show
David Nolen added a comment - This ticket needs more details, how can this error be reproduced?
David Nolen made changes -
Field Original Value New Value
Priority Major [ 3 ] Minor [ 4 ]
Hide
Peter Taoussanis added a comment - - edited

Hi, I'm seeing the same problem with tools.reader 0.8.0.

Any Clojurescript file (even an empty file) will produce the error.

Clojure: 1.6.0-alpha2
Clojurescript: 0.0-2030
Cljsbuild: 1.0.0
tools.reader: 0.8.0

Tried `lein cljsbuild clean`.

Problem is resolved by dropping back to tools.reader 0.7.10.

Update: have created an issue on the tools.reader GitHub page: https://github.com/clojure/tools.reader/issues/7

Update 2: this isn't something specific to Cljs 0.0-2030 btw, tools.reader 0.8.0 seems to produce the same error against at least Cljs 0.0-2060, 0.0-2027, 0.0-2024.

Show
Peter Taoussanis added a comment - - edited Hi, I'm seeing the same problem with tools.reader 0.8.0. Any Clojurescript file (even an empty file) will produce the error. Clojure: 1.6.0-alpha2 Clojurescript: 0.0-2030 Cljsbuild: 1.0.0 tools.reader: 0.8.0 Tried `lein cljsbuild clean`. Problem is resolved by dropping back to tools.reader 0.7.10. Update: have created an issue on the tools.reader GitHub page: https://github.com/clojure/tools.reader/issues/7 Update 2: this isn't something specific to Cljs 0.0-2030 btw, tools.reader 0.8.0 seems to produce the same error against at least Cljs 0.0-2060, 0.0-2027, 0.0-2024.
Hide
Nicola Mometto added a comment -

tools.reader 0.8.0 introduces end-column/end-line metadata, this needs to be elided as per line/column to avoid this bootstrapping issue.

Show
Nicola Mometto added a comment - tools.reader 0.8.0 introduces end-column/end-line metadata, this needs to be elided as per line/column to avoid this bootstrapping issue.
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]
Hide
Peter Taoussanis added a comment -

Thanks a lot David, Nicola - much appreciated! Cheers

Show
Peter Taoussanis added a comment - Thanks a lot David, Nicola - much appreciated! Cheers
Hide
John Chijioke added a comment -

Thanks David. Cheers!

Show
John Chijioke added a comment - Thanks David. Cheers!

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: