Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
76fd7aef
by Raymond Toy at 2019-04-17T19:20:16Z
4 changed files:
- src/contrib/asdf/asdf.lisp
- src/contrib/asdf/doc/asdf.html
- src/contrib/asdf/doc/asdf.info
- src/contrib/asdf/doc/asdf.pdf
Changes:
1 | 1 |
;;; -*- mode: Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
|
2 |
-;;; This is ASDF 3.3.2: Another System Definition Facility.
|
|
2 |
+;;; This is ASDF 3.3.3: Another System Definition Facility.
|
|
3 | 3 |
;;;
|
4 | 4 |
;;; Feedback, bug reports, and patches are all welcome:
|
5 | 5 |
;;; please mail to <asdf-devel@common-lisp.net>.
|
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 |
;;; http://www.opensource.org/licenses/mit-license.html on or about
|
20 | 20 |
;;; Monday; July 13, 2009)
|
21 | 21 |
;;;
|
22 |
-;;; Copyright (c) 2001-2016 Daniel Barlow and contributors
|
|
22 |
+;;; Copyright (c) 2001-2019 Daniel Barlow and contributors
|
|
23 | 23 |
;;;
|
24 | 24 |
;;; Permission is hereby granted, free of charge, to any person obtaining
|
25 | 25 |
;;; a copy of this software and associated documentation files (the
|
... | ... | @@ -45,6 +45,17 @@ |
45 | 45 |
;;; The problem with writing a defsystem replacement is bootstrapping:
|
46 | 46 |
;;; we can't use defsystem to compile it. Hence, all in one file.
|
47 | 47 |
|
48 |
+#+genera
|
|
49 |
+(eval-when (:compile-toplevel :load-toplevel :execute)
|
|
50 |
+ (multiple-value-bind (system-major system-minor)
|
|
51 |
+ (sct:get-system-version)
|
|
52 |
+ (multiple-value-bind (is-major is-minor)
|
|
53 |
+ (sct:get-system-version "Intel-Support")
|
|
54 |
+ (unless (or (> system-major 452)
|
|
55 |
+ (and is-major
|
|
56 |
+ (or (> is-major 3)
|
|
57 |
+ (and (= is-major 3) (> is-minor 86)))))
|
|
58 |
+ (error "ASDF requires either System 453 or later or Intel Support 3.87 or later")))))
|
|
48 | 59 |
;;;; ---------------------------------------------------------------------------
|
49 | 60 |
;;;; Handle ASDF package upgrade, including implementation-dependent magic.
|
50 | 61 |
;;
|
... | ... | @@ -818,10 +829,10 @@ UNINTERN -- Remove symbols here from PACKAGE." |
818 | 829 |
|
819 | 830 |
;;;; Early meta-level tweaks
|
820 | 831 |
|
821 |
-#+(or allegro clasp clisp clozure cmucl ecl mezzano mkcl sbcl)
|
|
832 |
+#+(or allegro clasp clisp clozure cmucl ecl lispworks mezzano mkcl sbcl)
|
|
822 | 833 |
(eval-when (:load-toplevel :compile-toplevel :execute)
|
823 | 834 |
(when (and #+allegro (member :ics *features*)
|
824 |
- #+(or clasp clisp cmucl ecl mkcl) (member :unicode *features*)
|
|
835 |
+ #+(or clasp clisp cmucl ecl lispworks mkcl) (member :unicode *features*)
|
|
825 | 836 |
#+clozure (member :openmcl-unicode-strings *features*)
|
826 | 837 |
#+sbcl (member :sb-unicode *features*))
|
827 | 838 |
;; Check for unicode at runtime, so that a hypothetical FASL compiled with unicode
|
... | ... | @@ -1043,7 +1054,9 @@ Return a string made of the parts not omitted or emitted by FROB." |
1043 | 1054 |
#:simple-style-warning #:style-warn ;; simple style warnings
|
1044 | 1055 |
#:match-condition-p #:match-any-condition-p ;; conditions
|
1045 | 1056 |
#:call-with-muffled-conditions #:with-muffled-conditions
|
1046 |
- #:not-implemented-error #:parameter-error))
|
|
1057 |
+ #:not-implemented-error #:parameter-error
|
|
1058 |
+ #:symbol-test-to-feature-expression
|
|
1059 |
+ #:boolean-to-feature-expression))
|
|
1047 | 1060 |
(in-package :uiop/utility)
|
1048 | 1061 |
|
1049 | 1062 |
;;;; Defining functions in a way compatible with hot-upgrade:
|
... | ... | @@ -1089,17 +1102,17 @@ to supersede any previous definition." |
1089 | 1102 |
;;; Magic debugging help. See contrib/debug.lisp
|
1090 | 1103 |
(with-upgradability ()
|
1091 | 1104 |
(defvar *uiop-debug-utility*
|
1092 |
- '(or (ignore-errors
|
|
1093 |
- (probe-file (symbol-call :asdf :system-relative-pathname :uiop "contrib/debug.lisp")))
|
|
1094 |
- (probe-file (symbol-call :uiop/pathname :subpathname
|
|
1095 |
- (user-homedir-pathname) "common-lisp/asdf/uiop/contrib/debug.lisp")))
|
|
1105 |
+ '(symbol-call :uiop :subpathname (symbol-call :uiop :uiop-directory) "contrib/debug.lisp")
|
|
1096 | 1106 |
"form that evaluates to the pathname to your favorite debugging utilities")
|
1097 | 1107 |
|
1098 | 1108 |
(defmacro uiop-debug (&rest keys)
|
1109 |
+ "Load the UIOP debug utility at compile-time as well as runtime"
|
|
1099 | 1110 |
`(eval-when (:compile-toplevel :load-toplevel :execute)
|
1100 | 1111 |
(load-uiop-debug-utility ,@keys)))
|
1101 | 1112 |
|
1102 | 1113 |
(defun load-uiop-debug-utility (&key package utility-file)
|
1114 |
+ "Load the UIOP debug utility in given PACKAGE (default *PACKAGE*).
|
|
1115 |
+Beware: The utility is located by EVAL'uating the UTILITY-FILE form (default *UIOP-DEBUG-UTILITY*)."
|
|
1103 | 1116 |
(let* ((*package* (if package (find-package package) *package*))
|
1104 | 1117 |
(keyword (read-from-string
|
1105 | 1118 |
(format nil ":DBG-~:@(~A~)" (package-name *package*)))))
|
... | ... | @@ -1658,6 +1671,18 @@ message, that takes the functionality as its first argument (that can be skipped |
1658 | 1671 |
:format-control format-control
|
1659 | 1672 |
:format-arguments format-arguments)))
|
1660 | 1673 |
|
1674 |
+(with-upgradability ()
|
|
1675 |
+ (defun boolean-to-feature-expression (value)
|
|
1676 |
+ "Converts a boolean VALUE to a form suitable for testing with #+."
|
|
1677 |
+ (if value
|
|
1678 |
+ '(:and)
|
|
1679 |
+ '(:or)))
|
|
1680 |
+ |
|
1681 |
+ (defun symbol-test-to-feature-expression (name package)
|
|
1682 |
+ "Check if a symbol with a given NAME exists in PACKAGE and returns a
|
|
1683 |
+form suitable for testing with #+."
|
|
1684 |
+ (boolean-to-feature-expression
|
|
1685 |
+ (find-symbol* name package nil))))
|
|
1661 | 1686 |
(uiop/package:define-package :uiop/version
|
1662 | 1687 |
(:recycle :uiop/version :uiop/utility :asdf)
|
1663 | 1688 |
(:use :uiop/common-lisp :uiop/package :uiop/utility)
|
... | ... | @@ -1672,7 +1697,7 @@ message, that takes the functionality as its first argument (that can be skipped |
1672 | 1697 |
(in-package :uiop/version)
|
1673 | 1698 |
|
1674 | 1699 |
(with-upgradability ()
|
1675 |
- (defparameter *uiop-version* "3.3.2")
|
|
1700 |
+ (defparameter *uiop-version* "3.3.3")
|
|
1676 | 1701 |
|
1677 | 1702 |
(defun unparse-version (version-list)
|
1678 | 1703 |
"From a parsed version (a list of natural numbers), compute the version string"
|
... | ... | @@ -2335,8 +2360,8 @@ by the underlying implementation's MAKE-PATHNAME and other primitives" |
2335 | 2360 |
;; See CLHS make-pathname and 19.2.2.2.3.
|
2336 | 2361 |
;; This will be :unspecific if supported, or NIL if not.
|
2337 | 2362 |
(defparameter *unspecific-pathname-type*
|
2338 |
- #+(or abcl allegro clozure cmucl genera lispworks sbcl scl) :unspecific
|
|
2339 |
- #+(or clasp clisp ecl mkcl gcl xcl #|These haven't been tested:|# cormanlisp mcl mezzano) nil
|
|
2363 |
+ #+(or abcl allegro clozure cmucl lispworks sbcl scl) :unspecific
|
|
2364 |
+ #+(or genera clasp clisp ecl mkcl gcl xcl #|These haven't been tested:|# cormanlisp mcl mezzano) nil
|
|
2340 | 2365 |
"Unspecific type component to use with the underlying implementation's MAKE-PATHNAME")
|
2341 | 2366 |
|
2342 | 2367 |
(defun make-pathname* (&rest keys &key directory host device name type version defaults
|
... | ... | @@ -2574,7 +2599,14 @@ actually-existing directory." |
2574 | 2599 |
(make-pathname :directory (append (or (normalize-pathname-directory-component
|
2575 | 2600 |
(pathname-directory pathspec))
|
2576 | 2601 |
(list :relative))
|
2577 |
- (list (file-namestring pathspec)))
|
|
2602 |
+ (list #-genera (file-namestring pathspec)
|
|
2603 |
+ ;; On Genera's native filesystem (LMFS),
|
|
2604 |
+ ;; directories have a type and version
|
|
2605 |
+ ;; which must be ignored when converting
|
|
2606 |
+ ;; to a directory pathname
|
|
2607 |
+ #+genera (if (typep pathspec 'fs:lmfs-pathname)
|
|
2608 |
+ (pathname-name pathspec)
|
|
2609 |
+ (file-namestring pathspec))))
|
|
2578 | 2610 |
:name nil :type nil :version nil :defaults pathspec)
|
2579 | 2611 |
(error (c) (call-function on-error (compatfmt "~@<error while trying to create a directory pathname for ~S: ~A~@:>") pathspec c)))))))
|
2580 | 2612 |
|
... | ... | @@ -3056,7 +3088,13 @@ a CL pathname satisfying all the specified constraints as per ENSURE-PATHNAME" |
3056 | 3088 |
(or (ignore-errors (truename p))
|
3057 | 3089 |
;; this is here because trying to find the truename of a directory pathname WITHOUT supplying
|
3058 | 3090 |
;; a trailing directory separator, causes an error on some lisps.
|
3059 |
- #+(or clisp gcl) (if-let (d (ensure-directory-pathname p nil)) (ignore-errors (truename d)))))))
|
|
3091 |
+ #+(or clisp gcl) (if-let (d (ensure-directory-pathname p nil)) (ignore-errors (truename d)))
|
|
3092 |
+ ;; On Genera, truename of a directory pathname will probably fail as Genera
|
|
3093 |
+ ;; will merge in a filename/type/version from *default-pathname-defaults* and
|
|
3094 |
+ ;; will try to get the truename of a file that probably doesn't exist.
|
|
3095 |
+ #+genera (when (directory-pathname-p p)
|
|
3096 |
+ (let ((d (scl:send p :directory-pathname-as-file)))
|
|
3097 |
+ (ensure-directory-pathname (ignore-errors (truename d)) nil)))))))
|
|
3060 | 3098 |
|
3061 | 3099 |
(defun safe-file-write-date (pathname)
|
3062 | 3100 |
"Safe variant of FILE-WRITE-DATE that may return NIL rather than raise an error."
|
... | ... | @@ -4832,7 +4870,6 @@ or COMPRESSION on SBCL, and APPLICATION-TYPE on SBCL/Windows." |
4832 | 4870 |
(shell-boolean-exit
|
4833 | 4871 |
(restore-image))))))))
|
4834 | 4872 |
(when forms `(progn ,@forms))))))
|
4835 |
- #+(or clasp ecl mkcl)
|
|
4836 | 4873 |
(check-type kind (member :dll :shared-library :lib :static-library
|
4837 | 4874 |
:fasl :fasb :program))
|
4838 | 4875 |
(apply #+clasp 'cmp:builder #+clasp kind
|
... | ... | @@ -5209,12 +5246,28 @@ Simple means made of symbols, numbers, characters, simple-strings, pathnames, co |
5209 | 5246 |
(sb-c::undefined-warning-kind warning)
|
5210 | 5247 |
(sb-c::undefined-warning-name warning)
|
5211 | 5248 |
(sb-c::undefined-warning-count warning)
|
5249 |
+ ;; the COMPILER-ERROR-CONTEXT struct has changed in SBCL, which means how we
|
|
5250 |
+ ;; handle deferred warnings must change... TODO: when enough time has
|
|
5251 |
+ ;; gone by, just assume all versions of SBCL are adequately
|
|
5252 |
+ ;; up-to-date, and cut this material.[2018/05/30:rpg]
|
|
5212 | 5253 |
(mapcar
|
5213 | 5254 |
#'(lambda (frob)
|
5214 | 5255 |
;; the lexenv slot can be ignored for reporting purposes
|
5215 |
- `(:enclosing-source ,(sb-c::compiler-error-context-enclosing-source frob)
|
|
5216 |
- :source ,(sb-c::compiler-error-context-source frob)
|
|
5217 |
- :original-source ,(sb-c::compiler-error-context-original-source frob)
|
|
5256 |
+ `(
|
|
5257 |
+ #- #.(uiop/utility:symbol-test-to-feature-expression '#:compiler-error-context-%source '#:sb-c)
|
|
5258 |
+ ,@`(:enclosing-source
|
|
5259 |
+ ,(sb-c::compiler-error-context-enclosing-source frob)
|
|
5260 |
+ :source
|
|
5261 |
+ ,(sb-c::compiler-error-context-source frob)
|
|
5262 |
+ :original-source
|
|
5263 |
+ ,(sb-c::compiler-error-context-original-source frob))
|
|
5264 |
+ #+ #.(uiop/utility:symbol-test-to-feature-expression '#:compiler-error-context-%source '#:sb-c)
|
|
5265 |
+ ,@ `(:%enclosing-source
|
|
5266 |
+ ,(sb-c::compiler-error-context-enclosing-source frob)
|
|
5267 |
+ :%source
|
|
5268 |
+ ,(sb-c::compiler-error-context-source frob)
|
|
5269 |
+ :original-form
|
|
5270 |
+ ,(sb-c::compiler-error-context-original-form frob))
|
|
5218 | 5271 |
:context ,(sb-c::compiler-error-context-context frob)
|
5219 | 5272 |
:file-name ,(sb-c::compiler-error-context-file-name frob) ; a pathname
|
5220 | 5273 |
:file-position ,(sb-c::compiler-error-context-file-position frob) ; an integer
|
... | ... | @@ -5565,9 +5618,10 @@ it will filter them appropriately." |
5565 | 5618 |
(with-saved-deferred-warnings (warnings-file :source-namestring (namestring input-file))
|
5566 | 5619 |
(with-muffled-compiler-conditions ()
|
5567 | 5620 |
(or #-(or clasp ecl mkcl)
|
5568 |
- (apply 'compile-file input-file :output-file tmp-file
|
|
5569 |
- #+sbcl (if emit-cfasl (list* :emit-cfasl tmp-cfasl keywords) keywords)
|
|
5570 |
- #-sbcl keywords)
|
|
5621 |
+ (let (#+genera (si:*common-lisp-syntax-is-ansi-common-lisp* t))
|
|
5622 |
+ (apply 'compile-file input-file :output-file tmp-file
|
|
5623 |
+ #+sbcl (if emit-cfasl (list* :emit-cfasl tmp-cfasl keywords) keywords)
|
|
5624 |
+ #-sbcl keywords))
|
|
5571 | 5625 |
#+ecl (apply 'compile-file input-file :output-file
|
5572 | 5626 |
(if object-file
|
5573 | 5627 |
(list* object-file :system-p t keywords)
|
... | ... | @@ -5619,19 +5673,20 @@ it will filter them appropriately." |
5619 | 5673 |
(defun load* (x &rest keys &key &allow-other-keys)
|
5620 | 5674 |
"Portable wrapper around LOAD that properly handles loading from a stream."
|
5621 | 5675 |
(with-muffled-loader-conditions ()
|
5622 |
- (etypecase x
|
|
5623 |
- ((or pathname string #-(or allegro clozure genera) stream #+clozure file-stream)
|
|
5624 |
- (apply 'load x keys))
|
|
5625 |
- ;; Genera can't load from a string-input-stream
|
|
5626 |
- ;; ClozureCL 1.6 can only load from file input stream
|
|
5627 |
- ;; Allegro 5, I don't remember but it must have been broken when I tested.
|
|
5628 |
- #+(or allegro clozure genera)
|
|
5629 |
- (stream ;; make do this way
|
|
5630 |
- (let ((*package* *package*)
|
|
5631 |
- (*readtable* *readtable*)
|
|
5632 |
- (*load-pathname* nil)
|
|
5633 |
- (*load-truename* nil))
|
|
5634 |
- (eval-input x))))))
|
|
5676 |
+ (let (#+genera (si:*common-lisp-syntax-is-ansi-common-lisp* t))
|
|
5677 |
+ (etypecase x
|
|
5678 |
+ ((or pathname string #-(or allegro clozure genera) stream #+clozure file-stream)
|
|
5679 |
+ (apply 'load x keys))
|
|
5680 |
+ ;; Genera can't load from a string-input-stream
|
|
5681 |
+ ;; ClozureCL 1.6 can only load from file input stream
|
|
5682 |
+ ;; Allegro 5, I don't remember but it must have been broken when I tested.
|
|
5683 |
+ #+(or allegro clozure genera)
|
|
5684 |
+ (stream ;; make do this way
|
|
5685 |
+ (let ((*package* *package*)
|
|
5686 |
+ (*readtable* *readtable*)
|
|
5687 |
+ (*load-pathname* nil)
|
|
5688 |
+ (*load-truename* nil))
|
|
5689 |
+ (eval-input x)))))))
|
|
5635 | 5690 |
|
5636 | 5691 |
(defun load-from-string (string)
|
5637 | 5692 |
"Portably read and evaluate forms from a STRING."
|
... | ... | @@ -6930,7 +6985,7 @@ or an indication of failure via the EXIT-CODE of the process" |
6930 | 6985 |
|
6931 | 6986 |
(uiop/package:define-package :uiop/configuration
|
6932 | 6987 |
(:recycle :uiop/configuration :asdf/configuration) ;; necessary to upgrade from 2.27.
|
6933 |
- (:use :uiop/common-lisp :uiop/utility
|
|
6988 |
+ (:use :uiop/package :uiop/common-lisp :uiop/utility
|
|
6934 | 6989 |
:uiop/os :uiop/pathname :uiop/filesystem :uiop/stream :uiop/image :uiop/lisp-build)
|
6935 | 6990 |
(:export
|
6936 | 6991 |
#:user-configuration-directories #:system-configuration-directories ;; implemented in backward-driver
|
... | ... | @@ -6945,7 +7000,8 @@ or an indication of failure via the EXIT-CODE of the process" |
6945 | 7000 |
#:report-invalid-form #:invalid-configuration #:*ignored-configuration-form* #:*user-cache*
|
6946 | 7001 |
#:*clear-configuration-hook* #:clear-configuration #:register-clear-configuration-hook
|
6947 | 7002 |
#:resolve-location #:location-designator-p #:location-function-p #:*here-directory*
|
6948 |
- #:resolve-relative-location #:resolve-absolute-location #:upgrade-configuration))
|
|
7003 |
+ #:resolve-relative-location #:resolve-absolute-location #:upgrade-configuration
|
|
7004 |
+ #:uiop-directory))
|
|
6949 | 7005 |
(in-package :uiop/configuration)
|
6950 | 7006 |
|
6951 | 7007 |
(with-upgradability ()
|
... | ... | @@ -7337,7 +7393,28 @@ or just the first one (for direction :output or :io). |
7337 | 7393 |
"Compute (and return) the location of the default user-cache for translate-output
|
7338 | 7394 |
objects. Side-effects for cached file location computation."
|
7339 | 7395 |
(setf *user-cache* (xdg-cache-home "common-lisp" :implementation)))
|
7340 |
- (register-image-restore-hook 'compute-user-cache))
|
|
7396 |
+ (register-image-restore-hook 'compute-user-cache)
|
|
7397 |
+ |
|
7398 |
+ (defun uiop-directory ()
|
|
7399 |
+ "Try to locate the UIOP source directory at runtime"
|
|
7400 |
+ (labels ((pf (x) (ignore-errors (probe-file* x)))
|
|
7401 |
+ (sub (x y) (pf (subpathname x y)))
|
|
7402 |
+ (ssd (x) (ignore-errors (symbol-call :asdf :system-source-directory x))))
|
|
7403 |
+ ;; NB: conspicuously *not* including searches based on #.(current-lisp-pathname)
|
|
7404 |
+ (or
|
|
7405 |
+ ;; Look under uiop if available as source override, under asdf if avaiable as source
|
|
7406 |
+ (ssd "uiop")
|
|
7407 |
+ (sub (ssd "asdf") "uiop/")
|
|
7408 |
+ ;; Look in recommended path for user-visible source installation
|
|
7409 |
+ (sub (user-homedir-pathname) "common-lisp/asdf/uiop/")
|
|
7410 |
+ ;; Look in XDG paths under known package names for user-invisible source installation
|
|
7411 |
+ (xdg-data-pathname "common-lisp/source/asdf/uiop/")
|
|
7412 |
+ (xdg-data-pathname "common-lisp/source/cl-asdf/uiop/") ; traditional Debian location
|
|
7413 |
+ ;; The last one below is useful for Fare, primary (sole?) known user
|
|
7414 |
+ (sub (user-homedir-pathname) "cl/asdf/uiop/")
|
|
7415 |
+ (cerror "Configure source registry to include UIOP source directory and retry."
|
|
7416 |
+ "Unable to find UIOP directory")
|
|
7417 |
+ (uiop-directory)))))
|
|
7341 | 7418 |
;;; -------------------------------------------------------------------------
|
7342 | 7419 |
;;; Hacks for backward-compatibility with older versions of UIOP
|
7343 | 7420 |
|
... | ... | @@ -7372,7 +7449,8 @@ DEPRECATED. Use UIOP:XDG-CONFIG-PATHNAMES instead." |
7372 | 7449 |
(xdg-config-pathnames "common-lisp"))
|
7373 | 7450 |
(defun system-configuration-directories ()
|
7374 | 7451 |
"Return the list of system configuration directories for common-lisp.
|
7375 |
-DEPRECATED. Use UIOP:CONFIG-SYSTEM-PATHNAMES instead."
|
|
7452 |
+DEPRECATED. Use UIOP:SYSTEM-CONFIG-PATHNAMES (with argument \"common-lisp\"),
|
|
7453 |
+instead."
|
|
7376 | 7454 |
(system-config-pathnames "common-lisp"))
|
7377 | 7455 |
(defun in-first-directory (dirs x &key (direction :input))
|
7378 | 7456 |
"Finds the first appropriate file named X in the list of DIRS for I/O
|
... | ... | @@ -7521,7 +7599,7 @@ previously-loaded version of ASDF." |
7521 | 7599 |
;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5.
|
7522 | 7600 |
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
|
7523 | 7601 |
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
|
7524 |
- (asdf-version "3.3.2")
|
|
7602 |
+ (asdf-version "3.3.3")
|
|
7525 | 7603 |
(existing-version (asdf-version)))
|
7526 | 7604 |
(setf *asdf-version* asdf-version)
|
7527 | 7605 |
(when (and existing-version (not (equal asdf-version existing-version)))
|
... | ... | @@ -7534,7 +7612,7 @@ previously-loaded version of ASDF." |
7534 | 7612 |
;;; Upon upgrade, specially frob some functions and classes that are being incompatibly redefined
|
7535 | 7613 |
(when-upgrading ()
|
7536 | 7614 |
(let* ((previous-version (first *previous-asdf-versions*))
|
7537 |
- (redefined-functions ;; List of functions that changes incompatibly since 2.27:
|
|
7615 |
+ (redefined-functions ;; List of functions that changed incompatibly since 2.27:
|
|
7538 | 7616 |
;; gf signature changed (should NOT happen), defun that became a generic function,
|
7539 | 7617 |
;; method removed that will mess up with new ones (especially :around :before :after,
|
7540 | 7618 |
;; more specific or call-next-method'ed method) and/or semantics otherwise modified. Oops.
|
... | ... | @@ -7545,8 +7623,8 @@ previously-loaded version of ASDF." |
7545 | 7623 |
;; Also note that we don't include the defgeneric=>defun, because they are
|
7546 | 7624 |
;; done directly with defun* and need not trigger a punt on data.
|
7547 | 7625 |
;; See discussion at https://gitlab.common-lisp.net/asdf/asdf/merge_requests/36
|
7548 |
- `(,@(when (version<= previous-version "3.1.2") '(#:component-depends-on #:input-files)) ;; crucial methods *removed* before 3.1.2
|
|
7549 |
- ,@(when (version<= previous-version "3.1.7.20") '(#:find-component))))
|
|
7626 |
+ `(,@(when (version< previous-version "3.1.2") '(#:component-depends-on #:input-files)) ;; crucial methods *removed* before 3.1.2
|
|
7627 |
+ ,@(when (version< previous-version "3.1.7.20") '(#:find-component))))
|
|
7550 | 7628 |
(redefined-classes
|
7551 | 7629 |
;; redefining the classes causes interim circularities
|
7552 | 7630 |
;; with the old ASDF during upgrade, and many implementations bork
|
... | ... | @@ -7883,9 +7961,9 @@ or NIL for top-level components (a.k.a. systems)")) |
7883 | 7961 |
(defmethod component-parent ((component null)) nil)
|
7884 | 7962 |
|
7885 | 7963 |
;; Deprecated: Backward compatible way of computing the FILE-TYPE of a component.
|
7886 |
- ;; TODO: find users, have them stop using that, remove it for ASDF4.
|
|
7887 |
- (defgeneric source-file-type (component system)
|
|
7888 |
- (:documentation "DEPRECATED. Use the FILE-TYPE of a COMPONENT instead."))
|
|
7964 |
+ (with-asdf-deprecation (:style-warning "3.4")
|
|
7965 |
+ (defgeneric source-file-type (component system)
|
|
7966 |
+ (:documentation "DEPRECATED. Use the FILE-TYPE of a COMPONENT instead.")))
|
|
7889 | 7967 |
|
7890 | 7968 |
(define-condition duplicate-names (system-definition-error)
|
7891 | 7969 |
((name :initarg :name :reader duplicate-names-name))
|
... | ... | @@ -8222,6 +8300,7 @@ Use of INITARGS is not supported at this time." |
8222 | 8300 |
#:system-source-file #:system-source-directory #:system-relative-pathname
|
8223 | 8301 |
#:system-description #:system-long-description
|
8224 | 8302 |
#:system-author #:system-maintainer #:system-licence #:system-license
|
8303 |
+ #:system-version
|
|
8225 | 8304 |
#:definition-dependency-list #:definition-dependency-set #:system-defsystem-depends-on
|
8226 | 8305 |
#:system-depends-on #:system-weakly-depends-on
|
8227 | 8306 |
#:component-build-pathname #:build-pathname
|
... | ... | @@ -8243,8 +8322,10 @@ Use of INITARGS is not supported at this time." |
8243 | 8322 |
If no system is found, then signal an error if ERROR-P is true (the default), or else return NIL.
|
8244 | 8323 |
A system designator is usually a string (conventionally all lowercase) or a symbol, designating
|
8245 | 8324 |
the same system as its downcased name; it can also be a system object (designating itself)."))
|
8325 |
+ |
|
8246 | 8326 |
(defgeneric system-source-file (system)
|
8247 | 8327 |
(:documentation "Return the source file in which system is defined."))
|
8328 |
+ |
|
8248 | 8329 |
;; This is bad design, but was the easiest kluge I found to let the user specify that
|
8249 | 8330 |
;; some special actions create outputs at locations controled by the user that are not affected
|
8250 | 8331 |
;; by the usual output-translations.
|
... | ... | @@ -8263,6 +8344,7 @@ NB: This interface is subject to change. Please contact ASDF maintainers if you |
8263 | 8344 |
(with no argument) when running an image dumped from the COMPONENT.
|
8264 | 8345 |
|
8265 | 8346 |
NB: This interface is subject to change. Please contact ASDF maintainers if you use it."))
|
8347 |
+ |
|
8266 | 8348 |
(defmethod component-entry-point ((c component))
|
8267 | 8349 |
nil))
|
8268 | 8350 |
|
... | ... | @@ -8287,19 +8369,21 @@ a SYSTEM is redefined and its class is modified.")) |
8287 | 8369 |
(defclass system (module proto-system)
|
8288 | 8370 |
;; Backward-compatibility: inherit from module. ASDF4: only inherit from parent-component.
|
8289 | 8371 |
(;; {,long-}description is now inherited from component, but we add the legacy accessors
|
8290 |
- (description :accessor system-description)
|
|
8291 |
- (long-description :accessor system-long-description)
|
|
8292 |
- (author :accessor system-author :initarg :author :initform nil)
|
|
8293 |
- (maintainer :accessor system-maintainer :initarg :maintainer :initform nil)
|
|
8294 |
- (licence :accessor system-licence :initarg :licence
|
|
8295 |
- :accessor system-license :initarg :license :initform nil)
|
|
8296 |
- (homepage :accessor system-homepage :initarg :homepage :initform nil)
|
|
8297 |
- (bug-tracker :accessor system-bug-tracker :initarg :bug-tracker :initform nil)
|
|
8298 |
- (mailto :accessor system-mailto :initarg :mailto :initform nil)
|
|
8299 |
- (long-name :accessor system-long-name :initarg :long-name :initform nil)
|
|
8372 |
+ (description :writer (setf system-description))
|
|
8373 |
+ (long-description :writer (setf system-long-description))
|
|
8374 |
+ (author :writer (setf system-author) :initarg :author :initform nil)
|
|
8375 |
+ (maintainer :writer (setf system-maintainer) :initarg :maintainer :initform nil)
|
|
8376 |
+ (licence :writer (setf system-licence) :initarg :licence
|
|
8377 |
+ :writer (setf system-license) :initarg :license
|
|
8378 |
+ :initform nil)
|
|
8379 |
+ (homepage :writer (setf system-homepage) :initarg :homepage :initform nil)
|
|
8380 |
+ (bug-tracker :writer (setf system-bug-tracker) :initarg :bug-tracker :initform nil)
|
|
8381 |
+ (mailto :writer (setf system-mailto) :initarg :mailto :initform nil)
|
|
8382 |
+ (long-name :writer (setf system-long-name) :initarg :long-name :initform nil)
|
|
8300 | 8383 |
;; Conventions for this slot aren't clear yet as of ASDF 2.27, but whenever they are, they will be enforced.
|
8301 | 8384 |
;; I'm introducing the slot before the conventions are set for maximum compatibility.
|
8302 |
- (source-control :accessor system-source-control :initarg :source-control :initform nil)
|
|
8385 |
+ (source-control :writer (setf system-source-control) :initarg :source-control :initform nil)
|
|
8386 |
+ |
|
8303 | 8387 |
(builtin-system-p :accessor builtin-system-p :initform nil :initarg :builtin-system-p)
|
8304 | 8388 |
(build-pathname
|
8305 | 8389 |
:initform nil :initarg :build-pathname :accessor component-build-pathname)
|
... | ... | @@ -8375,6 +8459,35 @@ NB: The onus is unhappily on the user to avoid clashes." |
8375 | 8459 |
(frob-substrings (coerce-name name) '("/" ":" "\\") "--")))
|
8376 | 8460 |
|
8377 | 8461 |
|
8462 |
+;;; System virtual slot readers, recursing to the primary system if needed.
|
|
8463 |
+(with-upgradability ()
|
|
8464 |
+ (defvar *system-virtual-slots* '(long-name description long-description
|
|
8465 |
+ author maintainer mailto
|
|
8466 |
+ homepage source-control
|
|
8467 |
+ licence version bug-tracker)
|
|
8468 |
+ "The list of system virtual slot names.")
|
|
8469 |
+ (defun system-virtual-slot-value (system slot-name)
|
|
8470 |
+ "Return SYSTEM's virtual SLOT-NAME value.
|
|
8471 |
+If SYSTEM's SLOT-NAME value is NIL and SYSTEM is a secondary system, look in
|
|
8472 |
+the primary one."
|
|
8473 |
+ (or (slot-value system slot-name)
|
|
8474 |
+ (unless (primary-system-p system)
|
|
8475 |
+ (slot-value (find-system (primary-system-name system))
|
|
8476 |
+ slot-name))))
|
|
8477 |
+ (defmacro define-system-virtual-slot-reader (slot-name)
|
|
8478 |
+ `(defun* ,(intern (concatenate 'string (string :system-)
|
|
8479 |
+ (string slot-name)))
|
|
8480 |
+ (system)
|
|
8481 |
+ (system-virtual-slot-value system ',slot-name)))
|
|
8482 |
+ (defmacro define-system-virtual-slot-readers ()
|
|
8483 |
+ `(progn ,@(mapcar (lambda (slot-name)
|
|
8484 |
+ `(define-system-virtual-slot-reader ,slot-name))
|
|
8485 |
+ *system-virtual-slots*)))
|
|
8486 |
+ (define-system-virtual-slot-readers)
|
|
8487 |
+ (defun system-license (system)
|
|
8488 |
+ (system-virtual-slot-value system 'licence)))
|
|
8489 |
+ |
|
8490 |
+ |
|
8378 | 8491 |
;;;; Pathnames
|
8379 | 8492 |
|
8380 | 8493 |
(with-upgradability ()
|
... | ... | @@ -10786,8 +10899,9 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD." |
10786 | 10899 |
(defvar *old-asdf-systems* (make-hash-table :test 'equal))
|
10787 | 10900 |
|
10788 | 10901 |
;; (Private) function to check that a system that was found isn't an asdf downgrade.
|
10789 |
- ;; Returns T if everything went right, NIL if the system was an ASDF of the same or older version,
|
|
10790 |
- ;; that shall not be loaded. Also issue a warning if it was a strictly older version of ASDF.
|
|
10902 |
+ ;; Returns T if everything went right, NIL if the system was an ASDF at an older version,
|
|
10903 |
+ ;; or UIOP of the same or older version, that shall not be loaded.
|
|
10904 |
+ ;; Also issue a warning if it was a strictly older version of ASDF.
|
|
10791 | 10905 |
(defun check-not-old-asdf-system (name pathname)
|
10792 | 10906 |
(or (not (member name '("asdf" "uiop") :test 'equal))
|
10793 | 10907 |
(null pathname)
|
... | ... | @@ -10798,9 +10912,12 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD." |
10798 | 10912 |
(read-file-form version-pathname :at (if asdfp '(0) '(2 2 2)))))
|
10799 | 10913 |
(old-version (asdf-version)))
|
10800 | 10914 |
(cond
|
10801 |
- ;; Don't load UIOP of the exact same version: we already loaded it as part of ASDF.
|
|
10802 |
- ((and (equal old-version version) (equal name "uiop")) nil)
|
|
10803 |
- ((version<= old-version version) t) ;; newer or same version: Good!
|
|
10915 |
+ ;; Same version is OK for ASDF, to allow loading from modified source.
|
|
10916 |
+ ;; However, do *not* load UIOP of the exact same version:
|
|
10917 |
+ ;; it was already loaded it as part of ASDF and would only be double-loading.
|
|
10918 |
+ ;; Be quiet about it, though, since it's a normal situation.
|
|
10919 |
+ ((equal old-version version) asdfp)
|
|
10920 |
+ ((version< old-version version) t) ;; newer version: Good!
|
|
10804 | 10921 |
(t ;; old version: bad
|
10805 | 10922 |
(ensure-gethash
|
10806 | 10923 |
(list (namestring pathname) version) *old-asdf-systems*
|
... | ... | @@ -10962,6 +11079,8 @@ PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system." |
10962 | 11079 |
#:class-for-type #:*default-component-class*
|
10963 | 11080 |
#:determine-system-directory #:parse-component-form
|
10964 | 11081 |
#:non-toplevel-system #:non-system-system #:bad-system-name
|
11082 |
+ #:*known-systems-with-bad-secondary-system-names*
|
|
11083 |
+ #:known-system-with-bad-secondary-system-names-p
|
|
10965 | 11084 |
#:sysdef-error-component #:check-component-input
|
10966 | 11085 |
#:explain))
|
10967 | 11086 |
(in-package :asdf/parse-defsystem)
|
... | ... | @@ -11114,7 +11233,7 @@ Please only define ~S and secondary systems with a name starting with ~S (e.g. ~ |
11114 | 11233 |
;;; "inline methods"
|
11115 | 11234 |
(with-upgradability ()
|
11116 | 11235 |
(defparameter* +asdf-methods+
|
11117 |
- '(perform-with-restarts perform explain output-files operation-done-p))
|
|
11236 |
+ '(perform-with-restarts perform explain output-files operation-done-p))
|
|
11118 | 11237 |
|
11119 | 11238 |
(defun %remove-component-inline-methods (component)
|
11120 | 11239 |
(dolist (name +asdf-methods+)
|
... | ... | @@ -11127,19 +11246,55 @@ Please only define ~S and secondary systems with a name starting with ~S (e.g. ~ |
11127 | 11246 |
(component-inline-methods component)))
|
11128 | 11247 |
(component-inline-methods component) nil)
|
11129 | 11248 |
|
11249 |
+ (defparameter *standard-method-combination-qualifiers*
|
|
11250 |
+ '(:around :before :after))
|
|
11251 |
+ |
|
11252 |
+;;; Find inline method definitions of the form
|
|
11253 |
+;;;
|
|
11254 |
+;;; :perform (test-op :before (operation component) ...)
|
|
11255 |
+;;;
|
|
11256 |
+;;; in REST (which is the plist of all DEFSYSTEM initargs) and define the specified methods.
|
|
11130 | 11257 |
(defun %define-component-inline-methods (ret rest)
|
11258 |
+ ;; find key-value pairs that look like inline method definitions in REST. For each identified
|
|
11259 |
+ ;; definition, parse it and, if it is well-formed, define the method.
|
|
11131 | 11260 |
(loop* :for (key value) :on rest :by #'cddr
|
11132 | 11261 |
:for name = (and (keywordp key) (find key +asdf-methods+ :test 'string=))
|
11133 | 11262 |
:when name :do
|
11134 |
- (destructuring-bind (op &rest body) value
|
|
11135 |
- (loop :for arg = (pop body)
|
|
11136 |
- :while (atom arg)
|
|
11137 |
- :collect arg :into qualifiers
|
|
11138 |
- :finally
|
|
11139 |
- (destructuring-bind (o c) arg
|
|
11140 |
- (pushnew
|
|
11141 |
- (eval `(defmethod ,name ,@qualifiers ((,o ,op) (,c (eql ,ret))) ,@body))
|
|
11142 |
- (component-inline-methods ret)))))))
|
|
11263 |
+ ;; parse VALUE as an inline method definition of the form
|
|
11264 |
+ ;;
|
|
11265 |
+ ;; (OPERATION-NAME [QUALIFIER] (OPERATION-PARAMETER COMPONENT-PARAMETER) &rest BODY)
|
|
11266 |
+ (destructuring-bind (operation-name &rest rest) value
|
|
11267 |
+ (let ((qualifiers '()))
|
|
11268 |
+ ;; ensure that OPERATION-NAME is a symbol.
|
|
11269 |
+ (unless (and (symbolp operation-name) (not (null operation-name)))
|
|
11270 |
+ (sysdef-error "Ill-formed inline method: ~S. The first element is not a symbol ~
|
|
11271 |
+ designating an operation but ~S."
|
|
11272 |
+ value operation-name))
|
|
11273 |
+ ;; ensure that REST starts with either a cons (potential lambda list, further checked
|
|
11274 |
+ ;; below) or a qualifier accepted by the standard method combination. Everything else
|
|
11275 |
+ ;; is ill-formed. In case of a valid qualifier, pop it from REST so REST now definitely
|
|
11276 |
+ ;; has to start with the lambda list.
|
|
11277 |
+ (cond
|
|
11278 |
+ ((consp (car rest)))
|
|
11279 |
+ ((not (member (car rest)
|
|
11280 |
+ *standard-method-combination-qualifiers*))
|
|
11281 |
+ (sysdef-error "Ill-formed inline method: ~S. Only a single of the standard ~
|
|
11282 |
+ qualifiers ~{~S~^ ~} is allowed, not ~S."
|
|
11283 |
+ value *standard-method-combination-qualifiers* (car rest)))
|
|
11284 |
+ (t
|
|
11285 |
+ (setf qualifiers (list (pop rest)))))
|
|
11286 |
+ ;; REST must start with a two-element lambda list.
|
|
11287 |
+ (unless (and (listp (car rest))
|
|
11288 |
+ (length=n-p (car rest) 2)
|
|
11289 |
+ (null (cddar rest)))
|
|
11290 |
+ (sysdef-error "Ill-formed inline method: ~S. The operation name ~S is not followed by ~
|
|
11291 |
+ a lambda-list of the form (OPERATION COMPONENT) and a method body."
|
|
11292 |
+ value operation-name))
|
|
11293 |
+ ;; define the method.
|
|
11294 |
+ (destructuring-bind ((o c) &rest body) rest
|
|
11295 |
+ (pushnew
|
|
11296 |
+ (eval `(defmethod ,name ,@qualifiers ((,o ,operation-name) (,c (eql ,ret))) ,@body))
|
|
11297 |
+ (component-inline-methods ret)))))))
|
|
11143 | 11298 |
|
11144 | 11299 |
(defun %refresh-component-inline-methods (component rest)
|
11145 | 11300 |
;; clear methods, then add the new ones
|
... | ... | @@ -11253,6 +11408,13 @@ system names contained using COERCE-NAME. Return the result." |
11253 | 11408 |
(coerce-name (component-system component))))
|
11254 | 11409 |
component)))
|
11255 | 11410 |
|
11411 |
+ (defparameter* *known-systems-with-bad-secondary-system-names*
|
|
11412 |
+ (list-to-hash-set '("cl-ppcre")))
|
|
11413 |
+ (defun known-system-with-bad-secondary-system-names-p (asd-name)
|
|
11414 |
+ ;; Does .asd file with name ASD-NAME contain known exceptions
|
|
11415 |
+ ;; that should be screened out of checking for BAD-SYSTEM-NAME?
|
|
11416 |
+ (gethash asd-name *known-systems-with-bad-secondary-system-names*))
|
|
11417 |
+ |
|
11256 | 11418 |
(defun register-system-definition
|
11257 | 11419 |
(name &rest options &key pathname (class 'system) (source-file () sfp)
|
11258 | 11420 |
defsystem-depends-on &allow-other-keys)
|
... | ... | @@ -11270,8 +11432,11 @@ system names contained using COERCE-NAME. Return the result." |
11270 | 11432 |
(let* ((asd-name (and source-file
|
11271 | 11433 |
(equal "asd" (fix-case (pathname-type source-file)))
|
11272 | 11434 |
(fix-case (pathname-name source-file))))
|
11435 |
+ ;; note that PRIMARY-NAME is a *syntactically* primary name
|
|
11273 | 11436 |
(primary-name (primary-system-name name)))
|
11274 |
- (when (and asd-name (not (equal asd-name primary-name)))
|
|
11437 |
+ (when (and asd-name
|
|
11438 |
+ (not (equal asd-name primary-name))
|
|
11439 |
+ (not (known-system-with-bad-secondary-system-names-p asd-name)))
|
|
11275 | 11440 |
(warn (make-condition 'bad-system-name :source-file source-file :name name))))
|
11276 | 11441 |
(let* (;; NB: handle defsystem-depends-on BEFORE to create the system object,
|
11277 | 11442 |
;; so that in case it fails, there is no incomplete object polluting the build.
|
... | ... | @@ -11833,8 +11998,17 @@ which is probably not what you want; you probably need to tweak your output tran |
11833 | 11998 |
:static-library (resolve-symlinks* pathname))))
|
11834 | 11999 |
|
11835 | 12000 |
(defun linkable-system (x)
|
11836 |
- (or (if-let (s (find-system x))
|
|
12001 |
+ (or ;; If the system is available as source, use it.
|
|
12002 |
+ (if-let (s (find-system x))
|
|
12003 |
+ (and (output-files 'lib-op s) s))
|
|
12004 |
+ ;; If an ASDF upgrade is available from source, but not a UIOP upgrade to that,
|
|
12005 |
+ ;; then use the asdf/driver system instead of
|
|
12006 |
+ ;; the UIOP that was disabled by check-not-old-asdf-system.
|
|
12007 |
+ (if-let (s (and (equal (coerce-name x) "uiop")
|
|
12008 |
+ (output-files 'lib-op "asdf")
|
|
12009 |
+ (find-system "asdf/driver")))
|
|
11837 | 12010 |
(and (output-files 'lib-op s) s))
|
12011 |
+ ;; If there was no source upgrade, look for modules provided by the implementation.
|
|
11838 | 12012 |
(if-let (p (system-module-pathname (coerce-name x)))
|
11839 | 12013 |
(make-prebuilt-system x p))))
|
11840 | 12014 |
|
... | ... | @@ -12567,7 +12741,7 @@ after having found a .asd file? True by default.") |
12567 | 12741 |
(recurse-beyond-asds *recurse-beyond-asds*) ignore-cache)
|
12568 | 12742 |
(let ((visited (make-hash-table :test 'equalp)))
|
12569 | 12743 |
(flet ((collectp (dir)
|
12570 |
- (unless (and (not ignore-cache) (process-source-registry-cache directory collect))
|
|
12744 |
+ (unless (and (not ignore-cache) (process-source-registry-cache dir collect))
|
|
12571 | 12745 |
(let ((asds (collect-asds-in-directory dir collect)))
|
12572 | 12746 |
(or recurse-beyond-asds (not asds)))))
|
12573 | 12747 |
(recursep (x) ; x will be a directory pathname
|
... | ... | @@ -13225,6 +13399,7 @@ system or its dependencies if it has already been loaded." |
13225 | 13399 |
#:system-maintainer
|
13226 | 13400 |
#:system-license
|
13227 | 13401 |
#:system-licence
|
13402 |
+ #:system-version
|
|
13228 | 13403 |
#:system-source-file
|
13229 | 13404 |
#:system-source-directory
|
13230 | 13405 |
#:system-relative-pathname
|
No preview for this file type