CLJS: How can you find the version of clojurescript that you're running?

587 views
Skip to first unread message

Frank Siebenlist

unread,
Oct 20, 2012, 8:16:37 PM10/20/12
to Clojure, Frank Siebenlist
When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked?

Thanks, FrankS.

AtKaaZ

unread,
Oct 21, 2012, 2:51:47 AM10/21/12
to clo...@googlegroups.com
*clojure-version*
{:major 1, :minor 4, :incremental 0, :qualifier nil}


On Sun, Oct 21, 2012 at 2:16 AM, Frank Siebenlist <frank.si...@gmail.com> wrote:
When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked?

Thanks, FrankS.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en



--
I may be wrong or incomplete.
Please express any corrections / additions,
they are encouraged and appreciated.
At least one entity is bound to be transformed if you do ;)

David Nolen

unread,
Oct 21, 2012, 11:02:25 AM10/21/12
to clo...@googlegroups.com
There is not. That would be useful.


On Saturday, October 20, 2012, Frank Siebenlist wrote:
When you have different versions of clojurescript in the dependencies of your main project, how do you ask the repl what version it is running with… is there any easy function/var that I overlooked?

Thanks, FrankS.

Frank Siebenlist

unread,
Oct 21, 2012, 3:22:52 PM10/21/12
to Clojure, cloju...@googlegroups.com, Frank Siebenlist
I've created an JIRA issue for this:

http://dev.clojure.org/jira/browse/CLJS-402

and added a patch for the build script:
---
Auto-generation from the build script of version_autogen.clj and version_autogen.cljs files
that both define the cljs.version-autogen/clojurescript-version
with the current version info for both the clj and cljs environments
---

Feels a little crude, but it works…:

---
user=> (require 'cljs.version-autogen)
nil
user=> cljs.version-autogen/*clojurescript-version*
{:minor 0, :incremental 1514, :major 0}
user=> (run-repl-listen)
"Type: " :cljs/quit " to quit"
ClojureScript:cljs.user> (load-namespace 'cljs.version-autogen)

ClojureScript:cljs.user> cljs.version-autogen/*clojurescript-version*
{:incremental 1514, :major 0, :minor 0}
ClojureScript:cljs.user>
---

Any alternative approaches that would be more elegant?

-FrankS.
Reply all
Reply to author
Forward
0 new messages