From 6b216e2b7c4b8f4a54551ab3f01c2d2695a99d5b Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 18 Oct 2025 05:36:44 +0300 Subject: Revert "Added a SWANK server" This reverts commit 5db1d491cecd9b610e9693d10b5015822429d261. --- src/main.lisp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 712b25d..f9720c9 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -5,7 +5,6 @@ (:use :c2cl :ukkoclot/config :ukkoclot/inline-bots :ukkoclot/tg) (:import-from :anaphora :acond :awhen :it) (:import-from :log) - (:import-from :swank) (:import-from :ukkoclot/db :with-db) (:import-from :ukkoclot/serializing :fixup-value) (:import-from :ukkoclot/state :make-bot :bot-config :bot-power-on) @@ -24,19 +23,6 @@ (error (err) (report-error bot ,evt err))) (progn ,@body))) -(defun start-swank (port) - (log:info "Starting a SWANK server on port ~A..." port) - (swank:create-server :port port :dont-close t) - (log:info - "SWANK started. You can connect to it by forwarding ports via SSH: `ssh -L~A:127.0.0.1:~A username@server.com'" - port port) - (log:info "And then afterwards M-x slime-connect giving localhost and ~A" port)) - -(defun stop-swank (port) - (log:info "Stopping the SWANK server on port ~A..." port) - (swank:stop-server port) - (log:info "Done")) - (defun main () (log:config :debug) (unwind-protect @@ -50,12 +36,11 @@ (defun main-with-config (config) (unwind-protect (progn - (start-swank (config-swank-port config)) (with-db (db (config-db-path config)) (let ((bot (make-bot config db))) ;; TODO: Catch fatal errors & report them (wrapped-main bot config)))) - (stop-swank (config-swank-port config)))) + (log:info "We're done!"))) (defun wrapped-main (bot config) (when *in-prod* -- cgit v1.2.3