# HG changeset patch # User ellis # Date 1693185559 14400 # Node ID 02aa015bff7389562d56fb390f9a87af51343d40 # Parent 77da08c7f445e5cc1aeadc99a50759c941101c28 containerfile updates diff -r 77da08c7f445 -r 02aa015bff73 .hgignore --- a/.hgignore Sun Jun 18 22:25:28 2023 -0400 +++ b/.hgignore Sun Aug 27 21:19:19 2023 -0400 @@ -1,4 +1,4 @@ -out/.* +bin/.* .*Cargo.lock$ .*target/.* ffi/_demo.c$ diff -r 77da08c7f445 -r 02aa015bff73 Containerfile --- a/Containerfile Sun Jun 18 22:25:28 2023 -0400 +++ b/Containerfile Sun Aug 27 21:19:19 2023 -0400 @@ -1,4 +1,10 @@ FROM clfoundation/sbcl:latest -COPY . /usr/src/demo +ENV QUICKLISP_ADD_TO_INIT_FILE=true +ENV QUICKLISP_DIST_VERSION=latest +ENV LISP=sbcl WORKDIR /usr/src/demo +COPY . . +RUN mkdir -p ~/.config/common-lisp/source-registry.conf.d && \ + echo '(:tree "/usr/src/demo")' > ~/.config/common-lisp/source-registry.conf.d/workspace.conf && \ + /usr/local/bin/install-quicklisp CMD [ "make", "ci" ] \ No newline at end of file diff -r 77da08c7f445 -r 02aa015bff73 default-config.sexp --- a/default-config.sexp Sun Jun 18 22:25:28 2023 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -;; demo user configuration file \ No newline at end of file diff -r 77da08c7f445 -r 02aa015bff73 default.sxp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default.sxp Sun Aug 27 21:19:19 2023 -0400 @@ -0,0 +1,1 @@ +;; demo user configuration file \ No newline at end of file diff -r 77da08c7f445 -r 02aa015bff73 demo.asd --- a/demo.asd Sun Jun 18 22:25:28 2023 -0400 +++ b/demo.asd Sun Aug 27 21:19:19 2023 -0400 @@ -3,23 +3,29 @@ :version "0.1.0" :author "ellis " :maintainer "ellis " - :description "" - :homepage "https://rwest.io/p/demo" + :description "comp demo system" + :homepage "https://rwest.io/demo" :bug-tracker "https://lab.rwest.io/otom8/demo/issues" :source-control (:hg "https://lab.rwest.io/otom8/demo") - :license "WTFPL" - :depends-on (:log4cl :bordeaux-threads :clingon :clog) - :in-order-to ((test-op (test-op "src/test"))) - :build-pathname "demo" - :components ((:module "src" - :components ((:file "package") - (:file "cfg"))))) + :license "WTF" + :depends-on (:sxp :log4cl :bordeaux-threads :clog) + :in-order-to ((test-op (test-op "demo/tests"))) + :components ((:file "src/package") + (:file "src/cfg"))) (defmethod perform :after ((op load-op) (c (eql (find-system :demo)))) (pushnew :demo *features*)) +(defsystem "demo/cli" + :depends-on ("demo" "clingon") + :components ((:module "src/cli" + :components ((:file "cli")))) + :in-order-to ((test-op (test-op "demo/tests"))) + :build-operation "program-op" + :build-pathname "bin/demo") + (defsystem "demo/tests" - :depends-on ("demo" "fiveam") + :depends-on ("demo" "demo-cli" "fiveam") :components ((:module "src/tests" :serial t :components diff -r 77da08c7f445 -r 02aa015bff73 src/cli/cli.lisp --- a/src/cli/cli.lisp Sun Jun 18 22:25:28 2023 -0400 +++ b/src/cli/cli.lisp Sun Aug 27 21:19:19 2023 -0400 @@ -8,7 +8,7 @@ (defun cli-opts () "Returns the top-level CLI options." (list - (cli:make-option + (clingon:make-option :string :description "demo app to run" :short-name #\x @@ -16,7 +16,7 @@ :initial-value "client" :env-vars '("DEMO_APP") :key :app) - (cli:make-option + (clingon:make-option :string :description "path to config" :short-name #\c @@ -26,12 +26,12 @@ (defun cli-handler (cmd) "Handler for the `demo' command." - (let ((app (cli:getopt cmd :app))) + (let ((app (clingon:getopt cmd :app))) (format t "running: ~A!~%" app))) (defun cli-cmd () "Our demo command." - (cli:make-command + (clingon:make-command :name "demo" :description "A collection of demos" :version "1.0.0" @@ -42,4 +42,4 @@ (defun run-cli () "A demo of some common-lisp functionality." - (cli:run (cli-cmd))) + (clingon:run (cli-cmd))) diff -r 77da08c7f445 -r 02aa015bff73 src/cli/package.lisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cli/package.lisp Sun Aug 27 21:19:19 2023 -0400 @@ -0,0 +1,9 @@ +(defpackage :demo-cli + (:use :demo) + (:export + #:run-cli + #:demo-path + #:db-path + #:cli-opts + #:cli-handler + #:cli-cmd)) diff -r 77da08c7f445 -r 02aa015bff73 src/crates/service/main.rs --- a/src/crates/service/main.rs Sun Jun 18 22:25:28 2023 -0400 +++ b/src/crates/service/main.rs Sun Aug 27 21:19:19 2023 -0400 @@ -1,4 +1,4 @@ -use sqlx::postgres::{PgPool, PgPoolOptions}; + use tokio::net::TcpListener; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; diff -r 77da08c7f445 -r 02aa015bff73 src/package.lisp --- a/src/package.lisp Sun Jun 18 22:25:28 2023 -0400 +++ b/src/package.lisp Sun Aug 27 21:19:19 2023 -0400 @@ -1,38 +1,36 @@ ;; demo packages.lisp -(defpackage :demo-sys) + +(defpackage :demo-core + (:use :cl)) + (defpackage :demo-utils - (:use :demo-sys) + (:use :demo-core) (:export #:source-dir #:random-id - #:scan-dir) - (:export + #:scan-dir #:*cargo-target* #:*rs-macros* #:rs-defmacro #:rs-macroexpand-1 #:rs-macroexpand)) + (defpackage :demo-db - (:use :demo-sys) - (:nicknames :ddb)) + (:use :demo-core)) + (defpackage :demo-ui - (:use :demo-sys) + (:use :demo-core) (:export #:on-new-window #:start-ui)) + +(defpackage :demo + (:use #:cl #:demo-core #:demo-utils #:demo-db #:demo-ui) + (:local-nicknames + (#:bt #:bordeaux-threads))) + (defpackage :demo-cli - (:use :demo-sys) - (:export - #:run-cli - #:demo-path - #:db-path - #:cli-opts - #:cli-handler - #:cli-cmd)) -(defpackage :demo - (:use #:cl #:demo-sys #:demo-utils #:demo-db #:demo-ui #:demo-cli) - (:local-nicknames - (#:bt #:bordeaux-threads) - (#:cli #:clingon))) + (:use :demo :clingon)) + (defpackage :demo-user - (:use :demo #:cl-user)) + (:use :demo))