jolt/jolt-core/jolt
Yogthos ad5affe89f nREPL: surface startup failures and close the listen socket on shutdown
Two pre-existing issues in the nrepl command, exposed when #269 moved the accept
loop into a future.

jolt.nrepl/start was invoked inside (future ...), so binding the socket happened
on a background thread. A bind failure such as the port already being in use was
captured into a future that nothing derefs and silently swallowed, leaving the
main thread parked in run-main-pump forever with no server and no error. start
now binds the socket synchronously before returning, so that failure propagates
to the caller and the process exits with a visible message. Only the blocking
accept loop runs on a worker thread.

There was also no shutdown path: the accept loop ran forever and the listen
socket was never closed. start now returns a stop fn that breaks the accept
loop, closes the socket to free the port, and removes .nrepl-port. main.clj runs
run-main-pump and then calls the stop fn, so a stop-main-pump (from a glimmer app
on quit, or from nrepl-evaluated code) shuts the server down cleanly and the
process exits.
2026-06-29 14:09:05 -04:00
..
passes Nilable record types + flow-sensitive nil narrowing (#235) 2026-06-26 17:16:16 +00:00
analyzer.clj *unchecked-math* on macro-emitted arithmetic + local shadowing a bare native op 2026-06-27 18:19:14 -04:00
backend_scheme.clj backend: cache resolved var cells per reference site (run-path ~5x) 2026-06-28 12:36:35 -04:00
deps.clj host interop + deps fixes for running ring-defaults on jolt 2026-06-25 04:42:35 -04:00
ir.clj Run core.memoize's test suite on jolt 2026-06-25 13:23:05 -04:00
main.clj nREPL: surface startup failures and close the listen socket on shutdown 2026-06-29 14:09:05 -04:00
nrepl.clj nREPL: surface startup failures and close the listen socket on shutdown 2026-06-29 14:09:05 -04:00
passes.clj Hintless whole-program double inference (#230) 2026-06-26 14:18:10 +00:00