Commit eef7278f authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

2.26.94: Yet another package cleanup. Debug the test scripts.

Package cleanup: every file in asdf itself now :use's asdf/driver asdf/upgrade.
Test script fix:
Allegro, like ECL *really* hates that we close *standard-input*,
so stop trying at all.
Tweak some utilities and debug utilities.
parent c534ca65
......@@ -3,8 +3,8 @@
(asdf/package:define-package :asdf/action
(:recycle :asdf/action :asdf)
(:use :common-lisp :asdf/compatibility :asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build
:asdf/upgrade :asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation)
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation)
#+gcl<2.7 (:shadowing-import-from :asdf/compatibility #:type-of)
(:intern #:stamp #:done-p)
(:export
......
......@@ -15,7 +15,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.26.93" ;; to be automatically updated by bin/bump-revision
:version "2.26.94" ;; to be automatically updated by bin/bump-revision
:depends-on ()
:components ((:module "build" :components ((:file "asdf"))))
:in-order-to (#+asdf2.27 (compile-op (monolithic-load-concatenated-source-op generate-asdf))))
......
......@@ -3,8 +3,8 @@
(asdf/package:define-package :asdf/backward-interface
(:recycle :asdf/backward-interface :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/run-program
:asdf/upgrade :asdf/component :asdf/system :asdf/operation :asdf/action
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/operation :asdf/action
:asdf/lisp-build :asdf/operate :asdf/output-translations)
(:export
#:*asdf-verbose*
......
......@@ -3,8 +3,8 @@
(asdf/package:define-package :asdf/backward-internals
(:recycle :asdf/backward-internals :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname
:asdf/upgrade :asdf/system :asdf/component :asdf/find-system :asdf/action)
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/system :asdf/component :asdf/find-system :asdf/action)
(:export ;; for internal use
#:%refresh-component-inline-methods
#:%resolve-if-component-dep-fails))
......
......@@ -2,17 +2,26 @@
":" ; exec sbcl --script "$0" "$@" ; exit # -*- Lisp -*-
;;; Really runs on any decent Common Lisp implementation
(setf *load-verbose* nil *load-print* nil
*compile-verbose* nil *compile-print* nil)
(format t "Loading ASDF... ~%")
(require :asdf)
(in-package :asdf)
#-asdf2 (error "Not ASDF2, you lose!")
(format t "Initializing the source registry... ~%")
(initialize-source-registry)
(format t "Making sure that's the latest... ~%")
(upgrade-asdf)
(format t "Now load some dependencies... ~%")
(load-systems :cl-ppcre :xcvb-utils)
(in-package :xcvb-utils)
(format t "And the debug utilities... ~%")
(asdf-debug)
(DBG "There we are!")
(resume-image)
(defun afile (x)
......@@ -50,17 +59,19 @@
&key (reader 'read-file-string)
(writer nil) (comparator 'equalp)
(external-format *utf-8-external-format*))
(format t "Transforming file ~A... " (file-namestring file))
(let* ((old-contents (funcall reader file))
(new-contents (funcall transformer old-contents)))
(if (funcall comparator old-contents new-contents)
(format t "No changes for file ~A~%" file)
(format t "no changes needed!~%")
(let ((written-contents
(if writer
(with-output (s ())
(funcall writer s new-contents))
new-contents)))
(check-type written-contents (or string (byte-vector)))
(clobber-file-with-vector file written-contents :external-format external-format)))))
(clobber-file-with-vector file written-contents :external-format external-format)
(format t "done.~%")))))
(defun version-transform (text)
(flet ((v1 (ver) (format nil "~S" ver))
......@@ -74,7 +85,6 @@
'("version.lisp-expr" "asdf.asd" "header.lisp" "build/asdf.lisp" "upgrade.lisp"))
(defun transform-file (x)
(format t "Transforming file ~A~%" x)
(maybe-replace-file (afile x) #'version-transform))
(map () 'transform-file *versioned-files*)
......@@ -3,8 +3,7 @@
(asdf/package:define-package :asdf/bundle
(:recycle :asdf/bundle :asdf)
(:intern #:build-args #:name-suffix #:prologue-code #:epilogue-code #:static-library)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build :asdf/upgrade
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation
:asdf/action :asdf/lisp-action :asdf/plan :asdf/operate)
(:export
......@@ -19,6 +18,7 @@
#+ecl #:make-build
#+mkcl #:mkcl-bundle-sub-operations #+mkcl #:files-to-bundle #+mkcl #:bundle-system
#+(or ecl mkcl) #:register-pre-built-system
#:build-args #:name-suffix #:prologue-code #:epilogue-code #:static-library
#:system-fasl))
(in-package :asdf/bundle)
......
......@@ -3,7 +3,7 @@
(asdf/package:define-package :asdf/component
(:recycle :asdf/component :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/stream :asdf/upgrade)
(:use :common-lisp :asdf/driver :asdf/upgrade)
(:export
#:component #:component-find-path
#:component-name #:component-pathname #:component-relative-pathname
......
......@@ -3,9 +3,8 @@
(asdf/package:define-package :asdf/concatenate-source
(:recycle :asdf/concatenate-source :asdf)
(:intern #:translate-output-p #:concatenated-source-file)
(:use :common-lisp :asdf/utility :asdf/stream
:asdf/upgrade :asdf/component :asdf/operation
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/operation
:asdf/system :asdf/find-system :asdf/defsystem
:asdf/action :asdf/lisp-action :asdf/bundle)
(:export
......@@ -19,7 +18,8 @@
#:monolithic-load-compiled-concatenated-source-op
#:concatenated-source-system
#:system-concatenated-source-file
#:system-translate-output-p))
#:system-translate-output-p
#:translate-output-p #:concatenated-source-file))
(in-package :asdf/concatenate-source)
;;;
......
;;;;; A few essential debugging utilities by Faré,
;;;;; to be loaded in the *PACKAGE* in which you wish to debug.
;; We want debugging utilities in the current package,
;; so we don't have to cheat with packages,
;; or have symbols that clash when trying use-package or import.
;;;;; to be loaded in the *PACKAGE* that you wish to debug.
;;
;; The short names of symbols below are unlikely to have defined bindings
;; in a well-designed source file to be debugged,
;; but are quite practical in a debugging session.
;; We want debugging utilities in the _current_ package,
;; so we don't have to either change the package structure
;; or use heavy package prefixes everywhere.
;;
;; The short names of symbols below are unlikely to clash
;; with global bindings of any well-designed source file being debugged,
;; yet are quite practical in a debugging session.
#|
;;; If ASDF is already loaded, you can load these utilities as follows:
;;; If ASDF is already loaded,
;;; you can load these utilities in the current package as follows:
(d:asdf-debug)
;; which if you left the :D nickname to asdf/driver is short for:
(asdf/utility::asdf-debug)
;; The above macro can be configured to load any other debugging utility
......@@ -24,7 +24,7 @@
;; on different machines, with your debug file in ~/lisp/debug-utils.lisp
;; you could in your ~/.sbclrc have the following configuration setting:
(require :asdf)
(setf asdf-utility:*asdf-debug-utility*
(setf asdf/utility:*asdf-debug-utility*
'(asdf/pathname:subpathname (asdf/os:user-homedir) "lisp/debug-utils.lisp"))
;;; If ASDF is not loaded (for instance, when debugging ASDF itself),
......@@ -32,8 +32,7 @@
(eval-when (:compile-toplevel :load-toplevel :execute)
(let ((kw (read-from-string (format nil ":DBG-~A" (package-name *package*)))))
(unless (member kw *features*)
(load "/home/tunes/cl/asdf/contrib/debug.lisp")
)))
(load "/home/tunes/cl/asdf/contrib/debug.lisp"))))
|#
......@@ -54,10 +53,12 @@
TAG is typically a constant string or keyword,
but in general is an expression returning a tag to be printed first;
if the expression returns NIL, nothing is printed.
EXPRS are expression, the source then the value of which is printed;
The values of the last expression are returned.
Aim for relatively low overhead in space of time.
Other expressions are not evaluated if TAG returned NIL."
EXPRS are expressions, which when the TAG was not NIL are evaluated in order,
with their source code then their return values being printed each time.
The last expresion is *always* evaluated and its values are returned,
but its source and return values are only printed if TAG was not NIL;
previous expressions are not evaluated at all if TAG returned NIL.
The macro expansion has relatively low overhead in space of time."
(let* ((last-expr (car (last exprs)))
(other-exprs (butlast exprs))
(tag-var (gensym "TAG"))
......@@ -99,10 +100,10 @@ Other expressions are not evaluated if TAG returned NIL."
;;; Quick definitions for use at the REPL
(defun w (x) (format t "~&~S~%" x)) ; Write
(defun a (&optional x) (format t "~&~@[~A~]~%" x)) ; print Anything
(defun e (x) (cons x (ignore-errors (list (eval x))))) ; eValuate
(defmacro x (x) `(format t "~&~S => ~S~%" ',x ,x)) ; eXamine
(defun w (&rest x) (format t "~&~{~S~^ ~}~%" x)) ;Write, space separated + LF
(defun a (&rest x) (format t "~&~{~A~}~%" x)) ;print Anything, no separator, LF
(defun e (x) (cons x (ignore-errors (list (eval x))))) ;eValuate
(defmacro x (x) `(format t "~&~S => ~S~%" ',x ,x)) ;eXamine
(defmacro !a (&rest foo) ; define! Alias
`(progn ,@(loop :for (alias name) :on foo :by #'cddr
:collect (if (macro-function name)
......
......@@ -3,8 +3,8 @@
(asdf/package:define-package :asdf/defsystem
(:recycle :asdf/defsystem :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/stream
:asdf/upgrade :asdf/component :asdf/system
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system
:asdf/find-system :asdf/find-component :asdf/lisp-action :asdf/operate
:asdf/backward-internals)
#+gcl<2.7 (:shadowing-import-from :asdf/compatibility #:type-of)
......
......@@ -3,8 +3,7 @@
(asdf/package:define-package :asdf/find-component
(:recycle :asdf/find-component :asdf)
(:use :common-lisp :asdf/utility :asdf/os
:asdf/upgrade :asdf/component :asdf/system :asdf/find-system)
(:use :common-lisp :asdf/driver :asdf/upgrade :asdf/component :asdf/system :asdf/find-system)
(:export
#:find-component
#:resolve-dependency-name #:resolve-dependency-spec
......
......@@ -3,8 +3,7 @@
(asdf/package:define-package :asdf/find-system
(:recycle :asdf/find-system :asdf)
(:use :common-lisp :asdf/compatibility :asdf/utility :asdf/pathname :asdf/stream :asdf/os
:asdf/lisp-build :asdf/upgrade :asdf/component :asdf/system)
(:use :common-lisp :asdf/driver :asdf/upgrade :asdf/component :asdf/system)
(:export
#:remove-entry-from-registry #:coerce-entry-to-directory
#:coerce-name #:find-system #:locate-system #:load-sysdef #:with-system-definitions
......
......@@ -3,12 +3,10 @@
(asdf/package:define-package :asdf/footer
(:recycle :asdf/footer :asdf)
(:use :common-lisp
:asdf/package :asdf/compatibility
:asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/find-system :asdf/find-component :asdf/operation :asdf/action :asdf/lisp-action
:asdf/operate :asdf/bundle :asdf/concatenate-source
:asdf/configuration :asdf/output-translations :asdf/source-registry
:asdf/output-translations :asdf/source-registry
:asdf/backward-internals :asdf/defsystem :asdf/backward-interface :asdf/interface))
(in-package :asdf/footer)
......
;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
;;; This is ASDF 2.26.93: Another System Definition Facility.
;;; This is ASDF 2.26.94: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -3,7 +3,7 @@
(asdf/package:define-package :asdf/image
(:recycle :asdf/image :xcvb-driver)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/stream :asdf/os)
(:use :common-lisp :asdf/package :asdf/utility :asdf/pathname :asdf/stream :asdf/os)
(:export
#:*dumped* #:raw-command-line-arguments #:*command-line-arguments*
#:command-line-arguments #:raw-command-line-arguments #:setup-command-line-arguments
......
......@@ -10,16 +10,13 @@
#:split #:make-collector
#:loaded-systems ; makes for annoying SLIME completion
#:output-files-for-system-and-operation) ; obsolete ASDF-BINARY-LOCATION function
(:use :common-lisp
:asdf/driver
:asdf/upgrade :asdf/component :asdf/system :asdf/find-system :asdf/find-component
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system :asdf/find-component
:asdf/operation :asdf/action :asdf/lisp-action
:asdf/output-translations :asdf/source-registry
:asdf/plan :asdf/operate :asdf/defsystem :asdf/bundle :asdf/concatenate-source
:asdf/backward-interface)
(:shadowing-import-from :asdf/package
:find-symbol* #:intern*)
;; TODO: automatically generate interface by merging select used packages?
:asdf/backward-internals :asdf/backward-interface)
;; TODO: automatically generate interface with reexport?
(:export
#:defsystem #:find-system #:locate-system #:coerce-name
#:oos #:operate #:traverse #:perform-plan
......
......@@ -4,8 +4,8 @@
(asdf/package:define-package :asdf/lisp-action
(:recycle :asdf/lisp-action :asdf)
(:intern #:proclamations #:flags)
(:use :common-lisp :asdf/compatibility :asdf/utility :asdf/lisp-build
:asdf/upgrade :asdf/component :asdf/system :asdf/find-component :asdf/operation :asdf/action)
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/find-component :asdf/operation :asdf/action)
(:export
#:compile-error #:compile-failed #:compile-warned #:try-recompiling
#:cl-source-file #:cl-source-file.cl #:cl-source-file.lsp
......
......@@ -3,10 +3,9 @@
(asdf/package:define-package :asdf/operate
(:recycle :asdf/operate :asdf)
(:use :common-lisp :asdf/package :asdf/utility :asdf/upgrade
:asdf/component :asdf/system :asdf/operation :asdf/action
:asdf/lisp-build :asdf/lisp-action #:asdf/plan
:asdf/find-system :asdf/find-component)
(:use :common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/system :asdf/operation :asdf/action
:asdf/find-system :asdf/find-component :asdf/lisp-action :asdf/plan)
(:export
#:operate #:oos #:*systems-being-operated* #:*asdf-upgrade-already-attempted*
#:load-system #:load-systems #:compile-system #:test-system #:require-system
......
......@@ -3,7 +3,7 @@
(asdf/package:define-package :asdf/operation
(:recycle :asdf/operation :asdf)
(:use :common-lisp :asdf/utility :asdf/upgrade)
(:use :common-lisp :asdf/driver :asdf/upgrade)
(:export
#:operation
#:operation-original-initargs ;; backward-compatibility only. DO NOT USE.
......
......@@ -3,7 +3,7 @@
(asdf/package:define-package :asdf/output-translations
(:recycle :asdf/output-translations :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build :asdf/upgrade :asdf/configuration)
(:use :common-lisp :asdf/driver :asdf/upgrade)
(:export
#:*output-translations* #:*output-translations-parameter*
#:invalid-output-translation
......
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