Exposing babashka.nrepl.server-functions (#1297)
Co-authored-by: Odd Andreas Sørsæther <odd.andreas.sorsether@nav.no> Co-authored-by: Odd Andreas Sørsæther <odd.andreas@ardoq.com>
This commit is contained in:
parent
9ed705f8db
commit
573db8ea79
3 changed files with 23 additions and 0 deletions
|
|
@ -5,6 +5,11 @@ For a list of breaking changes, check [here](#breaking-changes).
|
|||
A preview of the next release can be installed from
|
||||
[babashka-dev-builds](https://github.com/babashka/babashka-dev-builds).
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Expose `babashka.nrepl.server/start-server!`- and `stop-server!`-functions to support programmatically starting
|
||||
an nrepl-server. `start-server!` is redefined to not require a sci-context as its first argument.
|
||||
|
||||
## 0.8.156 (2022-06-08)
|
||||
|
||||
- macOS aarch64 support. Upgrading via brew or the installer script should
|
||||
|
|
|
|||
16
src/babashka/impl/nrepl_server.clj
Normal file
16
src/babashka/impl/nrepl_server.clj
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(ns babashka.impl.nrepl-server
|
||||
{:no-doc true}
|
||||
(:require [babashka.impl.common :as common]
|
||||
[babashka.nrepl.server :refer [start-server! stop-server!]]
|
||||
[sci.core :refer [create-ns new-var copy-var]]))
|
||||
|
||||
(def nrepl-server-namespace
|
||||
(let [ns-sci (create-ns 'babashka.nrepl.server)]
|
||||
{'start-server! (new-var 'start-server!
|
||||
(fn
|
||||
([]
|
||||
(start-server! @common/ctx))
|
||||
([opts]
|
||||
(start-server! @common/ctx opts)))
|
||||
{:ns ns-sci})
|
||||
'stop-server! (copy-var stop-server! ns-sci)}))
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
[babashka.impl.error-handler :refer [error-handler]]
|
||||
[babashka.impl.features :as features]
|
||||
[babashka.impl.fs :refer [fs-namespace]]
|
||||
[babashka.impl.nrepl-server :refer [nrepl-server-namespace]]
|
||||
[babashka.impl.pods :as pods]
|
||||
[babashka.impl.pprint :refer [pprint-namespace]]
|
||||
[babashka.impl.print-deps :as print-deps]
|
||||
|
|
@ -354,6 +355,7 @@ Use bb run --help to show this help output.
|
|||
'clojure.tools.cli tools-cli-namespace
|
||||
'clojure.java.shell shell-namespace
|
||||
'babashka.core bbcore/core-namespace
|
||||
'babashka.nrepl.server nrepl-server-namespace
|
||||
'babashka.wait wait-namespace
|
||||
'babashka.signal signal-ns
|
||||
'clojure.java.io io-namespace
|
||||
|
|
|
|||
Loading…
Reference in a new issue