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

Missing clojure.core/*clojure-version* #382

Closed
jeroenvandijk opened this issue Aug 21, 2020 · 2 comments
Closed

Missing clojure.core/*clojure-version* #382

jeroenvandijk opened this issue Aug 21, 2020 · 2 comments

Comments

@jeroenvandijk
Copy link
Contributor

version

Tested with babashka v0.1.3 (Sci version 91b553a)

platform

All, but tested on Mac Osx

problem

Exception about "Missing clojure.core/clojure-version"

repro

Deps

export BABASHKA_CLASSPATH=$(clojure -Spath -Sdeps '{:deps {  borkdude/edamame {:mvn/version "0.0.11-alpha.13"} }  }')

Script

#!/usr/bin/env bb

(require '[edamame.core :refer [parse-string]]))

Gives

clojure.lang.ExceptionInfo: Could not resolve symbol: *clojure-version* [at clojure/tools/reader/impl/utils.clj, line 17, column 35]

expected behavior

No errors

** Work around **

(require 'clojure.core)
(in-ns 'clojure.core)

(def *clojure-version* {:major      1
                        :minor      10
                       :incremental 1
                       :qualifier   nil})
                       
;; Go back to previous ns
@borkdude
Copy link
Collaborator

Additionally, we need to expose (clojure-version) as well. I'd say we just expose the Clojure version of the host environment, perhaps with an additional "-sci" modifier or so.

@borkdude
Copy link
Collaborator

Another note: this only applies to the JVM Clojure version, CLJS afaik doesn't have such a thing.

borkdude added a commit that referenced this issue Mar 12, 2022
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