Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.rrb-vector by

Revise code to support bootstrapped ClojureScript.

(This can be done with a few minor changes to the {{clojure.core.rrb-vector.macros}} namespace.)

3 Answers

0 votes
by

Comment made by: mfikes

To test the above patch, I updated the {{project.clj}} a little to get {{lein cljsbuild test}} to work, and then ran the unit tests using {{jsc out/test.js}}, and it reported that all tests passed.

I also loaded the macros namespace into into the shipping ClojureScript JAR and exercised things with assertions enabled to ensure the change is good, using this to start things up:

java -cp cljs.jar:core.rrb-vector-0.0.12-SNAPSHOT.jar clojure.main -m cljs.repl.node

I also tested things in bootstrapped ClojureScript using Lumo (https://github.com/anmonteiro/lumo), loading the jar using

lumo -c core.rrb-vector-0.0.12-SNAPSHOT.jar

and exercising the API a little, particularly with respect to vector creation.

FWIW, {{core.rbb-vector}} has been working fine with bootstrapped ClojureScript since May 2016 within Planck (https://github.com/mfikes/planck/) as Planck uses Fipp, which uses {{core.rbb-vector}}. The revisions in this ticket are only to address what was needed to make {{core.rbb-vector}} be dynamically loaded into a a bootstrapped ClojureScript environment (Planck AOT compiles things, and the macros namespace of {{core.rbb-vector}} is compiled by JVM ClojureScript, thus sidestepping the specific issues addressed in this ticket.)

0 votes
by

Comment made by: mfikes

A recent development that could help in supporting bootstrapped ClojureScript is a tool that facilitates running unit tests in the Lumo and Planck self-hosted environments: https://github.com/mfikes/tach

0 votes
by
Reference: https://clojure.atlassian.net/browse/CRRBV-16 (reported by mfikes)
...