changeset 32: |
02aa015bff73 |
parent 31: |
77da08c7f445 |
child 33: |
83a068855faa |
author: |
ellis <ellis@rwest.io> |
date: |
Sun, 27 Aug 2023 21:19:19 -0400 |
files: |
.hgignore Containerfile default-config.sexp default.sxp demo.asd src/cli/cli.lisp src/cli/package.lisp src/crates/service/main.rs src/package.lisp |
description: |
containerfile updates |
1.1--- a/.hgignore Sun Jun 18 22:25:28 2023 -0400
1.2+++ b/.hgignore Sun Aug 27 21:19:19 2023 -0400
1.3@@ -1,4 +1,4 @@
1.4-out/.*
1.5+bin/.*
1.6 .*Cargo.lock$
1.7 .*target/.*
1.8 ffi/_demo.c$
2.1--- a/Containerfile Sun Jun 18 22:25:28 2023 -0400
2.2+++ b/Containerfile Sun Aug 27 21:19:19 2023 -0400
2.3@@ -1,4 +1,10 @@
2.4 FROM clfoundation/sbcl:latest
2.5-COPY . /usr/src/demo
2.6+ENV QUICKLISP_ADD_TO_INIT_FILE=true
2.7+ENV QUICKLISP_DIST_VERSION=latest
2.8+ENV LISP=sbcl
2.9 WORKDIR /usr/src/demo
2.10+COPY . .
2.11+RUN mkdir -p ~/.config/common-lisp/source-registry.conf.d && \
2.12+ echo '(:tree "/usr/src/demo")' > ~/.config/common-lisp/source-registry.conf.d/workspace.conf && \
2.13+ /usr/local/bin/install-quicklisp
2.14 CMD [ "make", "ci" ]
2.15\ No newline at end of file
3.1--- a/default-config.sexp Sun Jun 18 22:25:28 2023 -0400
3.2+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3@@ -1,1 +0,0 @@
3.4-;; demo user configuration file
3.5\ No newline at end of file
4.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2+++ b/default.sxp Sun Aug 27 21:19:19 2023 -0400
4.3@@ -0,0 +1,1 @@
4.4+;; demo user configuration file
4.5\ No newline at end of file
5.1--- a/demo.asd Sun Jun 18 22:25:28 2023 -0400
5.2+++ b/demo.asd Sun Aug 27 21:19:19 2023 -0400
5.3@@ -3,23 +3,29 @@
5.4 :version "0.1.0"
5.5 :author "ellis <ellis@rwest.io>"
5.6 :maintainer "ellis <ellis@rwest.io>"
5.7- :description ""
5.8- :homepage "https://rwest.io/p/demo"
5.9+ :description "comp demo system"
5.10+ :homepage "https://rwest.io/demo"
5.11 :bug-tracker "https://lab.rwest.io/otom8/demo/issues"
5.12 :source-control (:hg "https://lab.rwest.io/otom8/demo")
5.13- :license "WTFPL"
5.14- :depends-on (:log4cl :bordeaux-threads :clingon :clog)
5.15- :in-order-to ((test-op (test-op "src/test")))
5.16- :build-pathname "demo"
5.17- :components ((:module "src"
5.18- :components ((:file "package")
5.19- (:file "cfg")))))
5.20+ :license "WTF"
5.21+ :depends-on (:sxp :log4cl :bordeaux-threads :clog)
5.22+ :in-order-to ((test-op (test-op "demo/tests")))
5.23+ :components ((:file "src/package")
5.24+ (:file "src/cfg")))
5.25
5.26 (defmethod perform :after ((op load-op) (c (eql (find-system :demo))))
5.27 (pushnew :demo *features*))
5.28
5.29+(defsystem "demo/cli"
5.30+ :depends-on ("demo" "clingon")
5.31+ :components ((:module "src/cli"
5.32+ :components ((:file "cli"))))
5.33+ :in-order-to ((test-op (test-op "demo/tests")))
5.34+ :build-operation "program-op"
5.35+ :build-pathname "bin/demo")
5.36+
5.37 (defsystem "demo/tests"
5.38- :depends-on ("demo" "fiveam")
5.39+ :depends-on ("demo" "demo-cli" "fiveam")
5.40 :components ((:module "src/tests"
5.41 :serial t
5.42 :components
6.1--- a/src/cli/cli.lisp Sun Jun 18 22:25:28 2023 -0400
6.2+++ b/src/cli/cli.lisp Sun Aug 27 21:19:19 2023 -0400
6.3@@ -8,7 +8,7 @@
6.4 (defun cli-opts ()
6.5 "Returns the top-level CLI options."
6.6 (list
6.7- (cli:make-option
6.8+ (clingon:make-option
6.9 :string
6.10 :description "demo app to run"
6.11 :short-name #\x
6.12@@ -16,7 +16,7 @@
6.13 :initial-value "client"
6.14 :env-vars '("DEMO_APP")
6.15 :key :app)
6.16- (cli:make-option
6.17+ (clingon:make-option
6.18 :string
6.19 :description "path to config"
6.20 :short-name #\c
6.21@@ -26,12 +26,12 @@
6.22
6.23 (defun cli-handler (cmd)
6.24 "Handler for the `demo' command."
6.25- (let ((app (cli:getopt cmd :app)))
6.26+ (let ((app (clingon:getopt cmd :app)))
6.27 (format t "running: ~A!~%" app)))
6.28
6.29 (defun cli-cmd ()
6.30 "Our demo command."
6.31- (cli:make-command
6.32+ (clingon:make-command
6.33 :name "demo"
6.34 :description "A collection of demos"
6.35 :version "1.0.0"
6.36@@ -42,4 +42,4 @@
6.37
6.38 (defun run-cli ()
6.39 "A demo of some common-lisp functionality."
6.40- (cli:run (cli-cmd)))
6.41+ (clingon:run (cli-cmd)))
7.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2+++ b/src/cli/package.lisp Sun Aug 27 21:19:19 2023 -0400
7.3@@ -0,0 +1,9 @@
7.4+(defpackage :demo-cli
7.5+ (:use :demo)
7.6+ (:export
7.7+ #:run-cli
7.8+ #:demo-path
7.9+ #:db-path
7.10+ #:cli-opts
7.11+ #:cli-handler
7.12+ #:cli-cmd))
8.1--- a/src/crates/service/main.rs Sun Jun 18 22:25:28 2023 -0400
8.2+++ b/src/crates/service/main.rs Sun Aug 27 21:19:19 2023 -0400
8.3@@ -1,4 +1,4 @@
8.4-use sqlx::postgres::{PgPool, PgPoolOptions};
8.5+
8.6 use tokio::net::TcpListener;
8.7 use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
8.8
9.1--- a/src/package.lisp Sun Jun 18 22:25:28 2023 -0400
9.2+++ b/src/package.lisp Sun Aug 27 21:19:19 2023 -0400
9.3@@ -1,38 +1,36 @@
9.4 ;; demo packages.lisp
9.5-(defpackage :demo-sys)
9.6+
9.7+(defpackage :demo-core
9.8+ (:use :cl))
9.9+
9.10 (defpackage :demo-utils
9.11- (:use :demo-sys)
9.12+ (:use :demo-core)
9.13 (:export
9.14 #:source-dir
9.15 #:random-id
9.16- #:scan-dir)
9.17- (:export
9.18+ #:scan-dir
9.19 #:*cargo-target*
9.20 #:*rs-macros*
9.21 #:rs-defmacro
9.22 #:rs-macroexpand-1
9.23 #:rs-macroexpand))
9.24+
9.25 (defpackage :demo-db
9.26- (:use :demo-sys)
9.27- (:nicknames :ddb))
9.28+ (:use :demo-core))
9.29+
9.30 (defpackage :demo-ui
9.31- (:use :demo-sys)
9.32+ (:use :demo-core)
9.33 (:export
9.34 #:on-new-window
9.35 #:start-ui))
9.36+
9.37+(defpackage :demo
9.38+ (:use #:cl #:demo-core #:demo-utils #:demo-db #:demo-ui)
9.39+ (:local-nicknames
9.40+ (#:bt #:bordeaux-threads)))
9.41+
9.42 (defpackage :demo-cli
9.43- (:use :demo-sys)
9.44- (:export
9.45- #:run-cli
9.46- #:demo-path
9.47- #:db-path
9.48- #:cli-opts
9.49- #:cli-handler
9.50- #:cli-cmd))
9.51-(defpackage :demo
9.52- (:use #:cl #:demo-sys #:demo-utils #:demo-db #:demo-ui #:demo-cli)
9.53- (:local-nicknames
9.54- (#:bt #:bordeaux-threads)
9.55- (#:cli #:clingon)))
9.56+ (:use :demo :clingon))
9.57+
9.58 (defpackage :demo-user
9.59- (:use :demo #:cl-user))
9.60+ (:use :demo))