Move tools system definition into main ASDF file

Start basic retrieval of resources.

Experiment with package per file strategy.

TODO untangle <file:tools/code-grapher.lisp> and
<file:tools/check.lisp> compile-time side effects so that they may be
properly encapsulated in ASDF:DEFSYSTEM forms.
parent 794b99f5
......@@ -157,3 +157,26 @@ be in a directory named '../ansi-test/'."
:components ((:file "index" :depends-on (grovel))
(:file "grovel")))))
(defsystem abcl/tools
:version "0.2.0"
:components (#+(or) ;; TODO Untangle source unit compile time execution
(:module grapher
:pathname "tools/"
:components ((:file "code-grapher")))
(:module digest
:pathname "tools/"
:components ((:file "digest")))))
#+(or) ;; TODO Untangle source unit compile time execution
(defsystem abcl/tools/bisect
:version "0.1.0"
:depends-on (abcl/test/ansi/compiled)
:components ((:module bisect
:pathname "tools/"
:components ((:file "check")))))
(defsystem abcl/tools/resource
:version "0.1.0"
:depends-on (dexador alexandria)
:components ((:module http :pathname "tools/"
:components ((:file "resource")))))
;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
(defsystem abcl-tools
:version "0.1.0"
:components ((:module src
:pathname ""
:components ((:file "digest")
(:file "code-grapher")))))
(defpackage abcl/tools/resource
(:use #:cl)
(in-package :abcl/tools/resource)
(defun retrieve (uri &key (destination #p"resource.get"))
(let ((stream (dexador:get uri :want-stream t)))
(alexandria:with-output-to-file (output destination)
(alexandria:copy-stream stream output))
(values ;; TODO track the number of bytes retrieved
(truename destination))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment