Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:

lint:
docker:
- image: circleci/clojure:openjdk-11-tools-deps-1.10.1.697-node
- image: cimg/clojure:1.11.1-openjdk-11.0-node

working_directory: ~/repo

Expand All @@ -15,7 +15,7 @@ jobs:
- restore_cache: # restores saved cache if checksum hasn't changed since the last run
key: clj-dependencies-{{ checksum "deps.edn" }}

- run: clojure -Mlint
- run: clojure -M:lint

- save_cache: # generate and store cache in the .m2 directory using a key template
paths:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

test-linux-clj-jdk8:
docker:
- image: circleci/clojure:openjdk-8-tools-deps-1.10.1.697-node
- image: cimg/clojure:1.11.1-openjdk-8.0-node

working_directory: ~/repo

Expand All @@ -61,10 +61,10 @@ jobs:
- restore_cache: # restores saved cache if checksum hasn't changed since the last run
key: clj-dependencies-{{ checksum "deps.edn" }}

- run: sudo apt-get -y install bc
- run: sudo apt-get update && sudo apt-get install -y bc

# run tests
- run: CI_ENV=1 clojure -Mtest -m cognitect.test-runner
- run: CI_ENV=1 clojure -X:test:run/test

- save_cache: # generate and store cache in the .m2 directory using a key template
paths:
Expand All @@ -74,7 +74,7 @@ jobs:

test-linux-clj-sci-jdk8:
docker:
- image: circleci/clojure:openjdk-8-tools-deps-1.10.1.697-node
- image: cimg/clojure:1.11.1-openjdk-8.0-node

working_directory: ~/repo

Expand All @@ -84,10 +84,10 @@ jobs:
- restore_cache: # restores saved cache if checksum hasn't changed since the last run
key: clj-sci-dependencies-{{ checksum "deps.edn" }}

- run: sudo apt-get -y install bc
- run: sudo apt-get update && sudo apt-get install -y bc

# run tests
- run: env CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -M:sci:test -m cognitect.test-runner
- run: env CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -X:sci:test:run/test

- save_cache: # generate and store cache in the .m2 directory using a key template
paths:
Expand All @@ -97,7 +97,7 @@ jobs:

test-linux-clj-jdk11:
docker:
- image: circleci/clojure:openjdk-11-tools-deps-1.10.1.697-node
- image: cimg/clojure:1.11.1-openjdk-11.0-node

working_directory: ~/repo

Expand All @@ -107,10 +107,10 @@ jobs:
- restore_cache: # restores saved cache if checksum hasn't changed since the last run
key: clj-jdk11-dependencies-{{ checksum "deps.edn" }}

- run: sudo apt-get -y install bc
- run: sudo apt-get update && sudo apt-get install -y bc

# run tests
- run: CI_ENV=1 clojure -Mtest -m cognitect.test-runner
- run: CI_ENV=1 clojure -X:test:run/test

- save_cache: # generate and store cache in the .m2 directory using a key template
paths:
Expand All @@ -120,7 +120,7 @@ jobs:

test-linux-clj-sci-jdk11:
docker:
- image: circleci/clojure:openjdk-11-tools-deps-1.10.1.697-node
- image: cimg/clojure:1.11.1-openjdk-11.0-node

working_directory: ~/repo

Expand All @@ -130,10 +130,10 @@ jobs:
- restore_cache: # restores saved cache if checksum hasn't changed since the last run
key: clj-jdk11-sci-dependencies-{{ checksum "deps.edn" }}

- run: sudo apt-get -y install bc
- run: sudo apt-get update && sudo apt-get install -y bc

# run tests
- run: CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -M:sci:test -m cognitect.test-runner
- run: CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -X:sci:test:run/test

- save_cache: # generate and store cache in the .m2 directory using a key template
paths:
Expand All @@ -143,7 +143,7 @@ jobs:

test-macos-cljs:
macos:
xcode: "11.3.1"
xcode: "13.4.1"

working_directory: /Users/distiller/project

Expand All @@ -169,7 +169,7 @@ jobs:

test-macos-clj:
macos:
xcode: "11.3.1"
xcode: "13.4.1"

working_directory: /Users/distiller/project

Expand All @@ -184,7 +184,7 @@ jobs:
- run: brew install clojure bc

# run tests
- run: CI_ENV=1 clojure -Mtest -m cognitect.test-runner
- run: CI_ENV=1 clojure -X:test:run/test

- save_cache:
paths:
Expand All @@ -194,7 +194,7 @@ jobs:

test-macos-clj-sci:
macos:
xcode: "11.3.1"
xcode: "13.4.1"

working_directory: /Users/distiller/project

Expand All @@ -209,7 +209,7 @@ jobs:
- run: brew install clojure bc

# run tests
- run: CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -M:sci:test -m cognitect.test-runner
- run: CI_ENV=1 __CLOSH_USE_SCI_EVAL__=1 clojure -X:sci:test:run/test

- save_cache:
paths:
Expand All @@ -222,11 +222,11 @@ workflows:
test:
jobs:
- lint
- test-linux-cljs
# - test-linux-cljs
- test-linux-clj-jdk8
- test-linux-clj-jdk11
- test-linux-clj-sci-jdk8
- test-linux-clj-sci-jdk11
- test-macos-cljs
# - test-macos-cljs
- test-macos-clj
- test-macos-clj-sci
23 changes: 20 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,35 @@
## [master](https://github.com/dundalek/closh/compare/v0.5.0...master) (unreleased)

### New features

- Upgrade org.xerial/sqlite-jdbc to 3.40.0.0, which provides Apple M1 compatibility

### Fixes

### Other changes

## [0.5.0](https://github.com/dundalek/closh/compare/v0.4.1...v0.5.0) (2020-06-01)
- Upgrade org.clojure/java.jdbc to 0.7.12
- Upgrade org.clojure/data.json to 2.4.0, because it's a lot faster
- Upgrade cljfmt to 0.9.0
- Upgrade Clojure to 1.11.1
- Upgrade org.clojure/tools.cli to 1.0.214
- Upgrade org.clojure/tools.reader to 1.3.6
- Upgrade SCI to 0.5.36, addressing https://github.com/dundalek/closh/issues/184
- Upgrade Cognitect test runner to v0.5.1 git tag
- Upgrade kaocha to 1.71.1119
- Upgrade com.cemerick/pomegranate to 1.2.1
- Upgrade depstar to 2.1.303

## [0.5.0](https://github.com/dundalek/closh/compare/v0.4.1...v0.5.0) (2020-06-01)

### New features

- JVM version: Improved history storage in (stores it in sqlite db same as the lumo version)
- JVM version: Implemented alias expansion by [@djblue](https://github.com/djblue) ([#150](https://github.com/dundalek/closh/pull/150))
- JVM version: Implemented alias expansion
by [@djblue](https://github.com/djblue) ([#150](https://github.com/dundalek/closh/pull/150))
- JVM version: Make abbreviations work (by treating them as same as aliases for now)
- Add support for `cd -` go to previous directory by [@kirillsalykin](https://github.com/kirillsalykin) ([#167](https://github.com/dundalek/closh/pull/167))
- Add support for `cd -` go to previous directory
by [@kirillsalykin](https://github.com/kirillsalykin) ([#167](https://github.com/dundalek/closh/pull/167))

### Fixes

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,29 @@ clojure -m closh.zero.frontend.rebel
```

Run tests once

```
npm run test
```

Re-run tests on change

```
npm run test-auto
```

Run tests via [Cognitect test runner](https://github.com/cognitect-labs/test-runner)

```shell
clojure -X:test:run/test
```

Run tests via [Kaocha](https://github.com/lambdaisland/kaocha)

```shell
clojure -X:kaocha:run/kaocha
```

### Manual Java builds

Run `npm run pkg-java`. The resulting binary will be in `target/closh-zero.jar`.
Expand Down
116 changes: 81 additions & 35 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,40 +1,86 @@
{:deps
{org.clojure/clojure {:mvn/version "1.10.2-alpha2"}
org.clojure/tools.reader {:mvn/version "1.3.2"}
org.clojure/data.json {:mvn/version "0.2.6"}
com.cemerick/pomegranate {:mvn/version "1.1.0"}
org.clojure/tools.cli {:mvn/version "0.4.1"}
org.clojure/java.jdbc {:mvn/version "0.7.9"}
org.xerial/sqlite-jdbc {:mvn/version "3.27.2.1"}
squarepeg/squarepeg {:mvn/version "0.6.1"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"
:exclusions [rewrite-cljs/rewrite-cljs]}}
{org.clojure/clojure
{:mvn/version "1.11.1"
:changelog "https://github.com/clojure/clojure/blob/master/changes.md"}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these changelog fields? Is that something supported by tools.deps?


org.clojure/tools.reader
{:mvn/version "1.3.6"
:changelog "https://github.com/clojure/tools.reader/blob/master/CHANGELOG.md"}

org.clojure/data.json
{:mvn/version "2.4.0"
:changelog "https://github.com/clojure/data.json#change-log"}

clj-commons/pomegranate
{:mvn/version "1.2.1"
:changelog "https://github.com/clj-commons/pomegranate/blob/master/CHANGES.md"}

org.clojure/tools.cli
{:mvn/version "1.0.214"
:changelog "https://github.com/clojure/tools.cli/blob/master/CHANGELOG.md"}

org.clojure/java.jdbc
{:mvn/version "0.7.12"
:changelog "https://github.com/clojure/java.jdbc/blob/master/CHANGES.md"}

org.xerial/sqlite-jdbc
{:mvn/version "3.40.0.0"
:changelog "https://github.com/xerial/sqlite-jdbc/releases"}

squarepeg/squarepeg
{:mvn/version "0.6.1"
:changelog "https://github.com/ericnormand/squarepeg/tags"}

com.bhauman/rebel-readline
{:mvn/version "0.1.4"
:exclusions [rewrite-cljs/rewrite-cljs]}}

:paths ["src/common" "src/jvm" "resources"]

:aliases
{:test {:extra-paths ["test"]
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner.git"
:sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}}}

:depstar {:extra-deps {seancorfield/depstar {:mvn/version "1.1.117"}}}

:sci {:extra-paths ["src/closh-sci" "classes"]
:extra-deps {fipp/fipp {:mvn/version "0.6.22"}
borkdude/sci {:mvn/version "0.1.0"}
borkdude/edamame {:mvn/version "0.0.10"}
com.bhauman/rebel-readline
{:git/url "https://github.com/dundalek/rebel-readline.git"
:sha "123be27a75de902233356e11ac66ac53cc5edc08"
:deps/root "rebel-readline"
:exclusions [rewrite-cljs/rewrite-cljs]}}}

:lint {:extra-deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}
:main-opts ["-m" "cljfmt.main" "--file-pattern" "(?<!clojure_main_sci)\\.clj[csx]?$" "check"]}

:lint/fix {:extra-deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}
:main-opts ["-m" "cljfmt.main" "--file-pattern" "(?<!clojure_main_sci)\\.clj[csx]?$" "fix"]}

:kaocha {:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-409"}}}}}
{:test
{:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:changelog "https://github.com/cognitect-labs/test-runner/blob/master/changes.md"}

:run/test
{:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}

:depstar
{:exec-fn hf.depstar/uberjar
:exec-args {:aot true}
:replace-deps
{com.github.seancorfield/depstar
{:mvn/version "2.1.303"
:changelog "https://github.com/seancorfield/depstar/blob/develop/CHANGELOG.md"}}}

:sci
{:extra-paths ["src/closh-sci" "classes"]
:extra-deps {fipp/fipp {:mvn/version "0.6.26"}
org.babashka/sci {:mvn/version "0.5.36"}
borkdude/edamame {:mvn/version "1.0.16"}
com.bhauman/rebel-readline
{:git/url "https://github.com/dundalek/rebel-readline.git"
:sha "123be27a75de902233356e11ac66ac53cc5edc08"
:deps/root "rebel-readline"
:exclusions [rewrite-cljs/rewrite-cljs]}}}

:lint
{:extra-deps {cljfmt/cljfmt {:mvn/version "0.9.0"}}
:main-opts ["-m" "cljfmt.main" "--file-pattern" "(?<!clojure_main_sci)\\.clj[csx]?$" "check"]}

:lint/fix
{:extra-deps {cljfmt/cljfmt {:mvn/version "0.9.0"}}
:main-opts ["-m" "cljfmt.main" "--file-pattern" "(?<!clojure_main_sci)\\.clj[csx]?$" "fix"]}

:kaocha
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha
{:mvn/version "1.71.1119"
:changelog "https://github.com/lambdaisland/kaocha/blob/main/CHANGELOG.md"}}}

:run/kaocha
{:exec-fn kaocha.runner/exec-fn
:exec-args {}}}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"docker-start": "npm run docker-build && docker run --rm -it closh",
"pkg-lumo": "pkg-lumo -c src/common:src/lumo -m closh.main",
"pkg-java": "npm run compile-uberjar && scripts/wrap-jar.sh target/closh-zero.jar",
"compile-uberjar": "clojure -M:depstar -m hf.depstar.uberjar --compile -m closh.zero.frontend.rebel target/closh-zero.jar --verbose",
"compile-uberjar": "clojure -X:depstar :main-class closh.zero.frontend.rebel :jar target/closh-zero.jar :verbose true",
"lint": "clojure -M:lint",
"lint-fix": "clojure -M:lint:lint/fix",
"lint-kondo": "clj-kondo --lint src:test",
Expand Down
2 changes: 1 addition & 1 deletion scripts/compile-sci-uberjar
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rm -rf classes
mkdir classes
clojure -Msci -e "(compile 'rebel-readline.line-reader-class)"
clojure -Asci -Spom
clojure -M:depstar:sci -m hf.depstar.uberjar --compile -m closh.zero.frontend.sci-rebel "$jar" # --verbose
clojure -X:depstar :aliases '[:sci]' :main-class closh.zero.frontend.sci-rebel :jar "$jar" :verbose true
2 changes: 0 additions & 2 deletions src/jvm/closh/zero/utils/clojure_main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
LineNumberingPushbackReader RT LispReader$ReaderException)))
;;(:use [clojure.repl :only (demunge root-cause stack-element-str)])


(declare main)

;;;;;;;;;;;;;;;;;;; redundantly copied from clojure.repl to avoid dep ;;;;;;;;;;;;;;
Expand Down Expand Up @@ -71,7 +70,6 @@
" (" (.getFileName el) ":" (.getLineNumber el) ")")))
;;;;;;;;;;;;;;;;;;; end of redundantly copied from clojure.repl to avoid dep ;;;;;;;;;;;;;;


(defmacro with-bindings
"Executes body in the context of thread-local bindings for several vars
that often need to be set!: *ns* *warn-on-reflection* *math-context*
Expand Down
Loading