Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

5 changed files:

Changes:

  • src/contrib/asdf/asdf.lisp
    1 1
     ;;; -*- mode: Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
    
    2
    -;;; This is ASDF 3.3.1: Another System Definition Facility.
    
    2
    +;;; This is ASDF 3.3.2: 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>.
    
    ... ... @@ -747,13 +747,13 @@ or when loading the package is optional."
    747 747
             :and :do (setf use-p t) :else
    
    748 748
           :when (eq kw :unintern) :append args :into unintern :else
    
    749 749
             :do (error "unrecognized define-package keyword ~S" kw)
    
    750
    -      :finally (return `(,package
    
    751
    -                         :nicknames ,nicknames :documentation ,documentation
    
    752
    -                         :use ,(if use-p use '(:common-lisp))
    
    753
    -                         :shadow ,shadow :shadowing-import-from ,shadowing-import-from
    
    754
    -                         :import-from ,import-from :export ,export :intern ,intern
    
    755
    -                         :recycle ,(if recycle-p recycle (cons package nicknames))
    
    756
    -                         :mix ,mix :reexport ,reexport :unintern ,unintern)))))
    
    750
    +      :finally (return `(',package
    
    751
    +                         :nicknames ',nicknames :documentation ',documentation
    
    752
    +                         :use ',(if use-p use '(:common-lisp))
    
    753
    +                         :shadow ',shadow :shadowing-import-from ',shadowing-import-from
    
    754
    +                         :import-from ',import-from :export ',export :intern ',intern
    
    755
    +                         :recycle ',(if recycle-p recycle (cons package nicknames))
    
    756
    +                         :mix ',mix :reexport ',reexport :unintern ',unintern)))))
    
    757 757
     
    
    758 758
     (defmacro define-package (package &rest clauses)
    
    759 759
       "DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form
    
    ... ... @@ -779,7 +779,10 @@ export symbols with the same name as those exported from p. Note that in the ca
    779 779
     of shadowing, etc. the symbols with the same name may not be the same symbols.
    
    780 780
     UNINTERN -- Remove symbols here from PACKAGE."
    
    781 781
       (let ((ensure-form
    
    782
    -          `(apply 'ensure-package ',(parse-define-package-form package clauses))))
    
    782
    +         `(prog1
    
    783
    +              (funcall 'ensure-package ,@(parse-define-package-form package clauses))
    
    784
    +            #+sbcl (setf (sb-impl::package-source-location (find-package ',package))
    
    785
    +                         (sb-c:source-location)))))
    
    783 786
         `(progn
    
    784 787
            #+(or clasp ecl gcl mkcl) (defpackage ,package (:use))
    
    785 788
            (eval-when (:compile-toplevel :load-toplevel :execute)
    
    ... ... @@ -807,7 +810,7 @@ UNINTERN -- Remove symbols here from PACKAGE."
    807 810
       #+(or mcl cmucl) (:shadow #:user-homedir-pathname))
    
    808 811
     (in-package :uiop/common-lisp)
    
    809 812
     
    
    810
    -#-(or abcl allegro clasp clisp clozure cmucl cormanlisp ecl gcl genera lispworks mcl mkcl sbcl scl xcl)
    
    813
    +#-(or abcl allegro clasp clisp clozure cmucl cormanlisp ecl gcl genera lispworks mcl mezzano mkcl sbcl scl xcl)
    
    811 814
     (error "ASDF is not supported on your implementation. Please help us port it.")
    
    812 815
     
    
    813 816
     ;; (declaim (optimize (speed 1) (debug 3) (safety 3))) ; DON'T: trust implementation defaults.
    
    ... ... @@ -815,7 +818,7 @@ UNINTERN -- Remove symbols here from PACKAGE."
    815 818
     
    
    816 819
     ;;;; Early meta-level tweaks
    
    817 820
     
    
    818
    -#+(or allegro clasp clisp clozure cmucl ecl mkcl sbcl)
    
    821
    +#+(or allegro clasp clisp clozure cmucl ecl mezzano mkcl sbcl)
    
    819 822
     (eval-when (:load-toplevel :compile-toplevel :execute)
    
    820 823
       (when (and #+allegro (member :ics *features*)
    
    821 824
                  #+(or clasp clisp cmucl ecl mkcl) (member :unicode *features*)
    
    ... ... @@ -1669,7 +1672,7 @@ message, that takes the functionality as its first argument (that can be skipped
    1669 1672
     (in-package :uiop/version)
    
    1670 1673
     
    
    1671 1674
     (with-upgradability ()
    
    1672
    -  (defparameter *uiop-version* "3.3.1")
    
    1675
    +  (defparameter *uiop-version* "3.3.2")
    
    1673 1676
     
    
    1674 1677
       (defun unparse-version (version-list)
    
    1675 1678
         "From a parsed version (a list of natural numbers), compute the version string"
    
    ... ... @@ -1897,6 +1900,10 @@ keywords explicitly."
    1897 1900
         "Is the underlying operating system Haiku?"
    
    1898 1901
         (featurep :haiku))
    
    1899 1902
     
    
    1903
    +  (defun os-mezzano-p ()
    
    1904
    +    "Is the underlying operating system Mezzano?"
    
    1905
    +    (featurep :mezzano))
    
    1906
    +
    
    1900 1907
       (defun detect-os ()
    
    1901 1908
         "Detects the current operating system. Only needs be run at compile-time,
    
    1902 1909
     except on ABCL where it might change between FASL compilation and runtime."
    
    ... ... @@ -1904,7 +1911,8 @@ except on ABCL where it might change between FASL compilation and runtime."
    1904 1911
                :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-macosx . os-macosx-p)
    
    1905 1912
                                              (:os-windows . os-windows-p)
    
    1906 1913
                                              (:genera . os-genera-p) (:os-oldmac . os-oldmac-p)
    
    1907
    -                                         (:haiku . os-haiku-p))
    
    1914
    +                                         (:haiku . os-haiku-p)
    
    1915
    +                                         (:mezzano . os-mezzano-p))
    
    1908 1916
                :when (and (or (not o) (eq feature :os-macosx)) (funcall detect))
    
    1909 1917
                :do (setf o feature) (pushnew feature *features*)
    
    1910 1918
                :else :do (setf *features* (remove feature *features*))
    
    ... ... @@ -1941,7 +1949,7 @@ use getenvp to return NIL in such a case."
    1941 1949
             (ct:free buffer)
    
    1942 1950
             (ct:free buffer1)))
    
    1943 1951
         #+gcl (system:getenv x)
    
    1944
    -    #+genera nil
    
    1952
    +    #+(or genera mezzano) nil
    
    1945 1953
         #+lispworks (lispworks:environment-variable x)
    
    1946 1954
         #+mcl (ccl:with-cstrs ((name x))
    
    1947 1955
                 (let ((value (_getenv name)))
    
    ... ... @@ -1949,7 +1957,7 @@ use getenvp to return NIL in such a case."
    1949 1957
                     (ccl:%get-cstring value))))
    
    1950 1958
         #+mkcl (#.(or (find-symbol* 'getenv :si nil) (find-symbol* 'getenv :mk-ext nil)) x)
    
    1951 1959
         #+sbcl (sb-ext:posix-getenv x)
    
    1952
    -    #-(or abcl allegro clasp clisp clozure cmucl cormanlisp ecl gcl genera lispworks mcl mkcl sbcl scl xcl)
    
    1960
    +    #-(or abcl allegro clasp clisp clozure cmucl cormanlisp ecl gcl genera lispworks mcl mezzano mkcl sbcl scl xcl)
    
    1953 1961
         (not-implemented-error 'getenv))
    
    1954 1962
     
    
    1955 1963
       (defsetf getenv (x) (val)
    
    ... ... @@ -1995,7 +2003,7 @@ then returning the non-empty string value of the variable"
    1995 2003
          '(:abcl (:acl :allegro) (:ccl :clozure) :clisp (:corman :cormanlisp)
    
    1996 2004
            (:cmu :cmucl :cmu) :clasp :ecl :gcl
    
    1997 2005
            (:lwpe :lispworks-personal-edition) (:lw :lispworks)
    
    1998
    -       :mcl :mkcl :sbcl :scl (:smbx :symbolics) :xcl)))
    
    2006
    +       :mcl :mezzano :mkcl :sbcl :scl (:smbx :symbolics) :xcl)))
    
    1999 2007
     
    
    2000 2008
       (defvar *implementation-type* (implementation-type)
    
    2001 2009
         "The type of Lisp implementation used, as a short UIOP-standardized keyword")
    
    ... ... @@ -2010,7 +2018,8 @@ then returning the non-empty string value of the variable"
    2010 2018
            (:solaris :solaris :sunos)
    
    2011 2019
            (:bsd :bsd :freebsd :netbsd :openbsd :dragonfly)
    
    2012 2020
            :unix
    
    2013
    -       :genera)))
    
    2021
    +       :genera
    
    2022
    +       :mezzano)))
    
    2014 2023
     
    
    2015 2024
       (defun architecture ()
    
    2016 2025
         "The CPU architecture of the current host"
    
    ... ... @@ -2068,6 +2077,9 @@ then returning the non-empty string value of the variable"
    2068 2077
             (multiple-value-bind (major minor) (sct:get-system-version "System")
    
    2069 2078
               (format nil "~D.~D" major minor))
    
    2070 2079
             #+mcl (subseq s 8) ; strip the leading "Version "
    
    2080
    +        #+mezzano (format nil "~A-~D"
    
    2081
    +                          (subseq s 0 (position #\space s)) ; strip commit hash
    
    2082
    +                          sys.int::*llf-version*)
    
    2071 2083
             ;; seems like there should be a shorter way to do this, like ACALL.
    
    2072 2084
             #+mkcl (or
    
    2073 2085
                     (let ((fname (find-symbol* '#:git-describe-this-mkcl :mkcl nil)))
    
    ... ... @@ -2093,7 +2105,7 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie
    2093 2105
     (with-upgradability ()
    
    2094 2106
       (defun hostname ()
    
    2095 2107
         "return the hostname of the current host"
    
    2096
    -    #+(or abcl clasp clozure cmucl ecl genera lispworks mcl mkcl sbcl scl xcl) (machine-instance)
    
    2108
    +    #+(or abcl clasp clozure cmucl ecl genera lispworks mcl mezzano mkcl sbcl scl xcl) (machine-instance)
    
    2097 2109
         #+cormanlisp "localhost" ;; is there a better way? Does it matter?
    
    2098 2110
         #+allegro (symbol-call :excl.osi :gethostname)
    
    2099 2111
         #+clisp (first (split-string (machine-instance) :separator " "))
    
    ... ... @@ -2113,7 +2125,7 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie
    2113 2125
     
    
    2114 2126
       (defun getcwd ()
    
    2115 2127
         "Get the current working directory as per POSIX getcwd(3), as a pathname object"
    
    2116
    -    (or #+(or abcl genera xcl) (truename *default-pathname-defaults*) ;; d-p-d is canonical!
    
    2128
    +    (or #+(or abcl genera mezzano xcl) (truename *default-pathname-defaults*) ;; d-p-d is canonical!
    
    2117 2129
             #+allegro (excl::current-directory)
    
    2118 2130
             #+clisp (ext:default-directory)
    
    2119 2131
             #+clozure (ccl:current-directory)
    
    ... ... @@ -2131,7 +2143,7 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie
    2131 2143
       (defun chdir (x)
    
    2132 2144
         "Change current directory, as per POSIX chdir(2), to a given pathname object"
    
    2133 2145
         (if-let (x (pathname x))
    
    2134
    -      #+(or abcl genera xcl) (setf *default-pathname-defaults* (truename x)) ;; d-p-d is canonical!
    
    2146
    +      #+(or abcl genera mezzano xcl) (setf *default-pathname-defaults* (truename x)) ;; d-p-d is canonical!
    
    2135 2147
           #+allegro (excl:chdir x)
    
    2136 2148
           #+clisp (ext:cd x)
    
    2137 2149
           #+clozure (setf (ccl:current-directory) x)
    
    ... ... @@ -2324,7 +2336,7 @@ by the underlying implementation's MAKE-PATHNAME and other primitives"
    2324 2336
       ;; This will be :unspecific if supported, or NIL if not.
    
    2325 2337
       (defparameter *unspecific-pathname-type*
    
    2326 2338
         #+(or abcl allegro clozure cmucl genera lispworks sbcl scl) :unspecific
    
    2327
    -    #+(or clasp clisp ecl mkcl gcl xcl #|These haven't been tested:|# cormanlisp mcl) nil
    
    2339
    +    #+(or clasp clisp ecl mkcl gcl xcl #|These haven't been tested:|# cormanlisp mcl mezzano) nil
    
    2328 2340
         "Unspecific type component to use with the underlying implementation's MAKE-PATHNAME")
    
    2329 2341
     
    
    2330 2342
       (defun make-pathname* (&rest keys &key directory host device name type version defaults
    
    ... ... @@ -4511,6 +4523,9 @@ This is designed to abstract away the implementation specific quit forms."
    4511 4523
               (dbg:*debug-print-level* *print-level*)
    
    4512 4524
               (dbg:*debug-print-length* *print-length*))
    
    4513 4525
           (dbg:bug-backtrace nil))
    
    4526
    +    #+mezzano
    
    4527
    +    (let ((*standard-output* stream))
    
    4528
    +      (sys.int::backtrace count))
    
    4514 4529
         #+sbcl
    
    4515 4530
         (sb-debug:print-backtrace :stream stream :count (or count most-positive-fixnum))
    
    4516 4531
         #+xcl
    
    ... ... @@ -4599,12 +4614,12 @@ depending on whether *LISP-INTERACTION* is set, enter debugger or die"
    4599 4614
         #+clozure ccl:*command-line-argument-list*
    
    4600 4615
         #+(or cmucl scl) extensions:*command-line-strings*
    
    4601 4616
         #+gcl si:*command-args*
    
    4602
    -    #+(or genera mcl) nil
    
    4617
    +    #+(or genera mcl mezzano) nil
    
    4603 4618
         #+lispworks sys:*line-arguments-list*
    
    4604 4619
         #+mkcl (loop :for i :from 0 :below (mkcl:argc) :collect (mkcl:argv i))
    
    4605 4620
         #+sbcl sb-ext:*posix-argv*
    
    4606 4621
         #+xcl system:*argv*
    
    4607
    -    #-(or abcl allegro clasp clisp clozure cmucl ecl gcl genera lispworks mcl mkcl sbcl scl xcl)
    
    4622
    +    #-(or abcl allegro clasp clisp clozure cmucl ecl gcl genera lispworks mcl mezzano mkcl sbcl scl xcl)
    
    4608 4623
         (not-implemented-error 'raw-command-line-arguments))
    
    4609 4624
     
    
    4610 4625
       (defun command-line-arguments (&optional (arguments (raw-command-line-arguments)))
    
    ... ... @@ -7506,7 +7521,7 @@ previously-loaded version of ASDF."
    7506 7521
              ;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5.
    
    7507 7522
              ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
    
    7508 7523
              ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
    
    7509
    -         (asdf-version "3.3.1")
    
    7524
    +         (asdf-version "3.3.2")
    
    7510 7525
              (existing-version (asdf-version)))
    
    7511 7526
         (setf *asdf-version* asdf-version)
    
    7512 7527
         (when (and existing-version (not (equal asdf-version existing-version)))
    
    ... ... @@ -8324,21 +8339,33 @@ a SYMBOL (designing its name, downcased), or a STRING (designing itself)."
    8324 8339
           (t (sysdef-error (compatfmt "~@<Invalid component designator: ~3i~_~A~@:>") name))))
    
    8325 8340
     
    
    8326 8341
       (defun primary-system-name (system-designator)
    
    8327
    -    "Given a system designator NAME, return the name of the corresponding primary system,
    
    8328
    -after which the .asd file is named. That's the first component when dividing the name
    
    8329
    -as a string by / slashes. A component designates its system."
    
    8342
    +    "Given a system designator NAME, return the name of the corresponding
    
    8343
    +primary system, after which the .asd file in which it is defined is named.
    
    8344
    +If given a string or symbol (to downcase), do it syntactically
    
    8345
    + by stripping anything from the first slash on.
    
    8346
    +If given a component, do it semantically by extracting
    
    8347
    +the system-primary-system-name of its system."
    
    8330 8348
         (etypecase system-designator
    
    8331 8349
           (string (if-let (p (position #\/ system-designator))
    
    8332 8350
                     (subseq system-designator 0 p) system-designator))
    
    8333 8351
           (symbol (primary-system-name (coerce-name system-designator)))
    
    8334
    -      (component (primary-system-name (coerce-name (component-system system-designator))))))
    
    8352
    +      (component (let* ((system (component-system system-designator))
    
    8353
    +                        (source-file (physicalize-pathname (system-source-file system))))
    
    8354
    +                   (and source-file
    
    8355
    +                        (equal (pathname-type source-file) "asd")
    
    8356
    +                        (pathname-name source-file))))))
    
    8335 8357
     
    
    8336 8358
       (defun primary-system-p (system)
    
    8337 8359
         "Given a system designator SYSTEM, return T if it designates a primary system, or else NIL.
    
    8338
    -Also return NIL if system is neither a SYSTEM nor a string designating one."
    
    8339
    -    (typecase system
    
    8360
    +If given a string, do it syntactically and return true if the name does not contain a slash.
    
    8361
    +If given a symbol, downcase to a string then fallback to previous case (NB: for NIL return T).
    
    8362
    +If given a component, do it semantically and return T if it's a SYSTEM and its primary-system-name
    
    8363
    +is the same as its component-name."
    
    8364
    +    (etypecase system
    
    8340 8365
           (string (not (find #\/ system)))
    
    8341
    -      (system (primary-system-p (coerce-name system)))))
    
    8366
    +      (symbol (primary-system-p (coerce-name system)))
    
    8367
    +      (component (and (typep system 'system)
    
    8368
    +                      (equal (component-name system) (primary-system-name system))))))
    
    8342 8369
     
    
    8343 8370
       (defun coerce-filename (name)
    
    8344 8371
         "Coerce a system designator NAME into a string suitable as a filename component.
    
    ... ... @@ -9999,6 +10026,24 @@ initialized with SEED."
    9999 10026
       ;; so they need not refer to the state of the filesystem,
    
    10000 10027
       ;; and the stamps could be cryptographic checksums rather than timestamps.
    
    10001 10028
       ;; Such a change remarkably would only affect COMPUTE-ACTION-STAMP.
    
    10029
    +  (define-condition dependency-not-done (warning)
    
    10030
    +    ((op
    
    10031
    +      :initarg :op)
    
    10032
    +     (component
    
    10033
    +      :initarg :component)
    
    10034
    +     (dep-op
    
    10035
    +      :initarg :dep-op)
    
    10036
    +     (dep-component
    
    10037
    +      :initarg :dep-component)
    
    10038
    +     (plan
    
    10039
    +      :initarg :plan
    
    10040
    +      :initform nil))
    
    10041
    +    (:report (lambda (condition stream)
    
    10042
    +               (with-slots (op component dep-op dep-component plan) condition
    
    10043
    +                 (format stream "Computing just-done stamp ~@[in plan ~S~] for action ~S, but dependency ~S wasn't done yet!"
    
    10044
    +                         plan
    
    10045
    +                         (action-path (make-action op component))
    
    10046
    +                         (action-path (make-action dep-op dep-component)))))))
    
    10002 10047
     
    
    10003 10048
       (defmethod compute-action-stamp (plan (o operation) (c component) &key just-done)
    
    10004 10049
         ;; Given an action, figure out at what time in the past it has been done,
    
    ... ... @@ -10032,10 +10077,10 @@ initialized with SEED."
    10032 10077
                           (just-done
    
    10033 10078
                            ;; It's OK to lose some ASDF action stamps during self-upgrade
    
    10034 10079
                            (unless (equal "asdf" (primary-system-name dc))
    
    10035
    -                         (warn "Computing just-done stamp in plan ~S for action ~S, but dependency ~S wasn't done yet!"
    
    10036
    -                               plan
    
    10037
    -                               (action-path (make-action o c))
    
    10038
    -                               (action-path (make-action do dc))))
    
    10080
    +                         (warn 'dependency-not-done
    
    10081
    +                               :plan plan
    
    10082
    +                               :op o :component c
    
    10083
    +                               :dep-op do :dep-component dc))
    
    10039 10084
                            status)
    
    10040 10085
                           (t
    
    10041 10086
                            (return (values nil nil))))))
    
    ... ... @@ -10682,11 +10727,9 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
    10682 10727
       ;; TODO: could this file be refactored so that locate-system is merely
    
    10683 10728
       ;; the cache-priming call to input-files here?
    
    10684 10729
       (defmethod input-files ((o define-op) (s system))
    
    10685
    -    (assert (equal (coerce-name s) (primary-system-name s)))
    
    10686 10730
         (if-let ((asd (system-source-file s))) (list asd)))
    
    10687 10731
     
    
    10688 10732
       (defmethod perform ((o define-op) (s system))
    
    10689
    -    (assert (equal (coerce-name s) (primary-system-name s)))
    
    10690 10733
         (nest
    
    10691 10734
          (if-let ((pathname (first (input-files o s)))))
    
    10692 10735
          (let ((readtable *readtable*) ;; save outer syntax tables. TODO: proper syntax-control
    
    ... ... @@ -10795,21 +10838,25 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
    10795 10838
     
    
    10796 10839
       (defun locate-system (name)
    
    10797 10840
         "Given a system NAME designator, try to locate where to load the system from.
    
    10798
    -Returns five values: FOUNDP FOUND-SYSTEM PATHNAME PREVIOUS PREVIOUS-TIME
    
    10841
    +Returns six values: FOUNDP FOUND-SYSTEM PATHNAME PREVIOUS PREVIOUS-TIME PREVIOUS-PRIMARY
    
    10799 10842
     FOUNDP is true when a system was found,
    
    10800 10843
     either a new unregistered one or a previously registered one.
    
    10801 10844
     FOUND-SYSTEM when not null is a SYSTEM object that may be REGISTER-SYSTEM'ed.
    
    10802 10845
     PATHNAME when not null is a path from which to load the system,
    
    10803 10846
     either associated with FOUND-SYSTEM, or with the PREVIOUS system.
    
    10804 10847
     PREVIOUS when not null is a previously loaded SYSTEM object of same name.
    
    10805
    -PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded."
    
    10848
    +PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
    
    10849
    +PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system."
    
    10806 10850
         (with-asdf-session () ;; NB: We don't cache the results. We once used to, but it wasn't useful,
    
    10807 10851
           ;; and keeping a negative cache was a bug (see lp#1335323), which required
    
    10808 10852
           ;; explicit invalidation in clear-system and find-system (when unsucccessful).
    
    10809 10853
           (let* ((name (coerce-name name))
    
    10810 10854
                  (previous (registered-system name)) ; load from disk if absent or newer on disk
    
    10811
    -             (primary (registered-system (primary-system-name name)))
    
    10812
    -             (previous-time (and previous primary (component-operation-time 'define-op primary)))
    
    10855
    +             (previous-primary-name (and previous (primary-system-name previous)))
    
    10856
    +             (previous-primary-system (and previous-primary-name
    
    10857
    +                                           (registered-system previous-primary-name)))
    
    10858
    +             (previous-time (and previous-primary-system
    
    10859
    +                                 (component-operation-time 'define-op previous-primary-system)))
    
    10813 10860
                  (found (search-for-system-definition name))
    
    10814 10861
                  (found-system (and (typep found 'system) found))
    
    10815 10862
                  (pathname (ensure-pathname
    
    ... ... @@ -10822,37 +10869,38 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
    10822 10869
             (unless (check-not-old-asdf-system name pathname)
    
    10823 10870
               (check-type previous system) ;; asdf is preloaded, so there should be a previous one.
    
    10824 10871
               (setf found-system nil pathname nil))
    
    10825
    -        (values foundp found-system pathname previous previous-time))))
    
    10872
    +        (values foundp found-system pathname previous previous-time previous-primary-system))))
    
    10873
    +
    
    10874
    +  ;; TODO: make a prepare-define-op node for this
    
    10875
    +  ;; so we can properly cache the answer rather than recompute it.
    
    10876
    +  (defun definition-dependencies-up-to-date-p (system)
    
    10877
    +    (check-type system system)
    
    10878
    +    (or (not (primary-system-p system))
    
    10879
    +        (handler-case
    
    10880
    +            (loop :with plan = (make-instance *plan-class*)
    
    10881
    +              :for action :in (definition-dependency-list system)
    
    10882
    +              :always (action-up-to-date-p
    
    10883
    +                       plan (action-operation action) (action-component action))
    
    10884
    +              :finally
    
    10885
    +              (let ((o (make-operation 'define-op)))
    
    10886
    +                (multiple-value-bind (stamp done-p)
    
    10887
    +                    (compute-action-stamp plan o system)
    
    10888
    +                  (return (and (timestamp<= stamp (component-operation-time o system))
    
    10889
    +                               done-p)))))
    
    10890
    +          (system-out-of-date () nil))))
    
    10826 10891
     
    
    10827 10892
       ;; Main method for find-system: first, make sure the computation is memoized in a session cache.
    
    10828 10893
       ;; Unless the system is immutable, use locate-system to find the primary system;
    
    10829 10894
       ;; reconcile the finding (if any) with any previous definition (in a previous session,
    
    10830 10895
       ;; preloaded, with a previous configuration, or before filesystem changes), and
    
    10831 10896
       ;; load a found .asd if appropriate. Finally, update registration table and return results.
    
    10832
    -
    
    10833
    -  (defun definition-dependencies-up-to-date-p (system)
    
    10834
    -    (check-type system system)
    
    10835
    -    (assert (primary-system-p system))
    
    10836
    -    (handler-case
    
    10837
    -        (loop :with plan = (make-instance *plan-class*)
    
    10838
    -          :for action :in (definition-dependency-list system)
    
    10839
    -          :always (action-up-to-date-p
    
    10840
    -                   plan (action-operation action) (action-component action))
    
    10841
    -          :finally
    
    10842
    -          (let ((o (make-operation 'define-op)))
    
    10843
    -            (multiple-value-bind (stamp done-p)
    
    10844
    -                (compute-action-stamp plan o system)
    
    10845
    -              (return (and (timestamp<= stamp (component-operation-time o system))
    
    10846
    -                           done-p)))))
    
    10847
    -      (system-out-of-date () nil)))
    
    10848
    -
    
    10849 10897
       (defmethod find-system ((name string) &optional (error-p t))
    
    10850 10898
         (nest
    
    10851 10899
          (with-asdf-session (:key `(find-system ,name)))
    
    10852 10900
          (let ((name-primary-p (primary-system-p name)))
    
    10853 10901
            (unless name-primary-p (find-system (primary-system-name name) nil)))
    
    10854 10902
          (or (and *immutable-systems* (gethash name *immutable-systems*) (registered-system name)))
    
    10855
    -     (multiple-value-bind (foundp found-system pathname previous previous-time)
    
    10903
    +     (multiple-value-bind (foundp found-system pathname previous previous-time previous-primary)
    
    10856 10904
              (locate-system name)
    
    10857 10905
            (assert (eq foundp (and (or found-system pathname previous) t))))
    
    10858 10906
          (let ((previous-pathname (system-source-file previous))
    
    ... ... @@ -10863,18 +10911,18 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
    10863 10911
              (setf (system-source-file system) pathname))
    
    10864 10912
            (if-let ((stamp (get-file-stamp pathname)))
    
    10865 10913
              (let ((up-to-date-p
    
    10866
    -                (and previous
    
    10914
    +                (and previous previous-primary
    
    10867 10915
                          (or (pathname-equal pathname previous-pathname)
    
    10868 10916
                              (and pathname previous-pathname
    
    10869 10917
                                   (pathname-equal
    
    10870 10918
                                    (physicalize-pathname pathname)
    
    10871 10919
                                    (physicalize-pathname previous-pathname))))
    
    10872 10920
                          (timestamp<= stamp previous-time)
    
    10873
    -                     ;; TODO: check that all dependencies are up-to-date.
    
    10874
    -                     ;; This necessitates traversing them without triggering
    
    10875
    -                     ;; the adding of nodes to the plan.
    
    10876
    -                     (or (not name-primary-p)
    
    10877
    -                         (definition-dependencies-up-to-date-p previous)))))
    
    10921
    +                     ;; Check that all previous definition-dependencies are up-to-date,
    
    10922
    +                     ;; traversing them without triggering the adding of nodes to the plan.
    
    10923
    +                     ;; TODO: actually have a prepare-define-op, extract its timestamp,
    
    10924
    +                     ;; and check that it is less than the stamp of the previous define-op ?
    
    10925
    +                     (definition-dependencies-up-to-date-p previous-primary))))
    
    10878 10926
                (unless up-to-date-p
    
    10879 10927
                  (restart-case
    
    10880 10928
                      (signal 'system-out-of-date :name name)
    
    ... ... @@ -11284,12 +11332,9 @@ system names contained using COERCE-NAME. Return the result."
    11284 11332
     (in-package :asdf/bundle)
    
    11285 11333
     
    
    11286 11334
     (with-upgradability ()
    
    11287
    -  (defclass bundle-op (operation)
    
    11288
    -    ;; NB: use of instance-allocated slots for operations is DEPRECATED
    
    11289
    -    ;; and only supported in a temporary fashion for backward compatibility.
    
    11290
    -    ;; Supported replacement: Define slots on program-system instead.
    
    11291
    -    ((bundle-type :initform :no-output-file :reader bundle-type :allocation :class))
    
    11335
    +  (defclass bundle-op (operation) ()
    
    11292 11336
         (:documentation "base class for operations that bundle outputs from multiple components"))
    
    11337
    +  (defgeneric bundle-type (bundle-op))
    
    11293 11338
     
    
    11294 11339
       (defclass monolithic-op (operation) ()
    
    11295 11340
         (:documentation "A MONOLITHIC operation operates on a system *and all of its
    
    ... ... @@ -11330,10 +11375,11 @@ itself."))
    11330 11375
       (defclass link-op (bundle-op) ()
    
    11331 11376
         (:documentation "Abstract operation for linking files together"))
    
    11332 11377
     
    
    11333
    -  (defclass gather-operation (bundle-op)
    
    11334
    -    ((gather-operation :initform nil :allocation :class :reader gather-operation)
    
    11335
    -     (gather-type :initform :no-output-file :allocation :class :reader gather-type))
    
    11378
    +  (defclass gather-operation (bundle-op) ()
    
    11336 11379
         (:documentation "Abstract operation for gathering many input files from a system"))
    
    11380
    +  (defgeneric gather-operation (gather-operation))
    
    11381
    +  (defmethod gather-operation ((o gather-operation)) nil)
    
    11382
    +  (defgeneric gather-type (gather-operation))
    
    11337 11383
     
    
    11338 11384
       (defun operation-monolithic-p (op)
    
    11339 11385
         (typep op 'monolithic-op))
    
    ... ... @@ -11370,11 +11416,12 @@ itself."))
    11370 11416
           `((,go ,@deps) ,@(call-next-method))))
    
    11371 11417
     
    
    11372 11418
       ;; Create a single fasl for the entire library
    
    11373
    -  (defclass basic-compile-bundle-op (bundle-op basic-compile-op)
    
    11374
    -    ((gather-type :initform #-(or clasp ecl mkcl) :fasl #+(or clasp ecl mkcl) :object
    
    11375
    -                  :allocation :class)
    
    11376
    -     (bundle-type :initform :fasb :allocation :class))
    
    11419
    +  (defclass basic-compile-bundle-op (bundle-op basic-compile-op) ()
    
    11377 11420
         (:documentation "Base class for compiling into a bundle"))
    
    11421
    +  (defmethod bundle-type ((o basic-compile-bundle-op)) :fasb)
    
    11422
    +  (defmethod gather-type ((o basic-compile-bundle-op))
    
    11423
    +    #-(or clasp ecl mkcl) :fasl
    
    11424
    +    #+(or clasp ecl mkcl) :object)
    
    11378 11425
     
    
    11379 11426
       ;; Analog to prepare-op, for load-bundle-op and compile-bundle-op
    
    11380 11427
       (defclass prepare-bundle-op (sideway-operation)
    
    ... ... @@ -11383,9 +11430,7 @@ itself."))
    11383 11430
           :allocation :class))
    
    11384 11431
         (:documentation "Operation class for loading the bundles of a system's dependencies"))
    
    11385 11432
     
    
    11386
    -  (defclass lib-op (link-op gather-operation non-propagating-operation)
    
    11387
    -    ((gather-type :initform :object :allocation :class)
    
    11388
    -     (bundle-type :initform :lib :allocation :class))
    
    11433
    +  (defclass lib-op (link-op gather-operation non-propagating-operation) ()
    
    11389 11434
         (:documentation "Compile the system and produce a linkable static library (.a/.lib)
    
    11390 11435
     for all the linkable object files associated with the system. Compare with DLL-OP.
    
    11391 11436
     
    
    ... ... @@ -11394,6 +11439,8 @@ written in C or another language with a compiler producing linkable object files
    11394 11439
     On CLASP, ECL, MKCL, these object files _also_ include the contents of Lisp files
    
    11395 11440
     themselves. In any case, this operation will produce what you need to further build
    
    11396 11441
     a static runtime for your system, or a dynamic library to load in an existing runtime."))
    
    11442
    +  (defmethod bundle-type ((o lib-op)) :lib)
    
    11443
    +  (defmethod gather-type ((o lib-op)) :object)
    
    11397 11444
     
    
    11398 11445
       ;; What works: on ECL, CLASP(?), MKCL, we link the many .o files from the system into the .so;
    
    11399 11446
       ;; on other implementations, we combine (usually concatenate) the .fasl files into one.
    
    ... ... @@ -11417,11 +11464,11 @@ faster and more resource efficient."))
    11417 11464
       ;; we'd have to have the monolithic-op not inherit from the main op,
    
    11418 11465
       ;; but instead inherit from a basic-FOO-op as with basic-compile-bundle-op above.
    
    11419 11466
     
    
    11420
    -  (defclass dll-op (link-op gather-operation non-propagating-operation)
    
    11421
    -    ((gather-type :initform :object :allocation :class)
    
    11422
    -     (bundle-type :initform :dll :allocation :class))
    
    11467
    +  (defclass dll-op (link-op gather-operation non-propagating-operation) ()
    
    11423 11468
         (:documentation "Compile the system and produce a dynamic loadable library (.so/.dll)
    
    11424 11469
     for all the linkable object files associated with the system. Compare with LIB-OP."))
    
    11470
    +  (defmethod bundle-type ((o dll-op)) :dll)
    
    11471
    +  (defmethod gather-type ((o dll-op)) :object)
    
    11425 11472
     
    
    11426 11473
       (defclass deliver-asd-op (basic-compile-op selfward-operation)
    
    11427 11474
         ((selfward-operation
    
    ... ... @@ -11450,27 +11497,25 @@ for all the linkable object files associated with the system. Compare with LIB-O
    11450 11497
         ((selfward-operation :initform 'monolithic-compile-bundle-op :allocation :class))
    
    11451 11498
         (:documentation "Load a single fasl for the system and its dependencies."))
    
    11452 11499
     
    
    11453
    -  (defclass monolithic-lib-op (lib-op monolithic-bundle-op non-propagating-operation)
    
    11454
    -    ((gather-type :initform :object :allocation :class))
    
    11500
    +  (defclass monolithic-lib-op (lib-op monolithic-bundle-op non-propagating-operation) ()
    
    11455 11501
         (:documentation "Compile the system and produce a linkable static library (.a/.lib)
    
    11456 11502
     for all the linkable object files associated with the system or its dependencies. See LIB-OP."))
    
    11457 11503
     
    
    11458
    -  (defclass monolithic-dll-op (dll-op monolithic-bundle-op non-propagating-operation)
    
    11459
    -    ((gather-type :initform :object :allocation :class))
    
    11504
    +  (defclass monolithic-dll-op (dll-op monolithic-bundle-op non-propagating-operation) ()
    
    11460 11505
         (:documentation "Compile the system and produce a dynamic loadable library (.so/.dll)
    
    11461 11506
     for all the linkable object files associated with the system or its dependencies. See LIB-OP"))
    
    11462 11507
     
    
    11463 11508
       (defclass image-op (monolithic-bundle-op selfward-operation
    
    11464 11509
                           #+(or clasp ecl mkcl) link-op #+(or clasp ecl mkcl) gather-operation)
    
    11465
    -    ((bundle-type :initform :image :allocation :class)
    
    11466
    -     (gather-operation :initform 'lib-op :allocation :class)
    
    11467
    -     #+(or clasp ecl mkcl) (gather-type :initform :static-library :allocation :class)
    
    11468
    -     (selfward-operation :initform '(#-(or clasp ecl mkcl) load-op) :allocation :class))
    
    11510
    +    ((selfward-operation :initform '(#-(or clasp ecl mkcl) load-op) :allocation :class))
    
    11469 11511
         (:documentation "create an image file from the system and its dependencies"))
    
    11512
    +  (defmethod bundle-type ((o image-op)) :image)
    
    11513
    +  #+(or clasp ecl mkcl) (defmethod gather-operation ((o image-op)) 'lib-op)
    
    11514
    +  #+(or clasp ecl mkcl) (defmethod gather-type ((o image-op)) :static-library)
    
    11470 11515
     
    
    11471
    -  (defclass program-op (image-op)
    
    11472
    -    ((bundle-type :initform :program :allocation :class))
    
    11516
    +  (defclass program-op (image-op) ()
    
    11473 11517
         (:documentation "create an executable file from the system and its dependencies"))
    
    11518
    +  (defmethod bundle-type ((o program-op)) :program)
    
    11474 11519
     
    
    11475 11520
       ;; From the ASDF-internal bundle-type identifier, get a filesystem-usable pathname type.
    
    11476 11521
       (defun bundle-pathname-type (bundle-type)
    
    ... ... @@ -11857,8 +11902,8 @@ which is probably not what you want; you probably need to tweak your output tran
    11857 11902
     ;;;
    
    11858 11903
     (with-upgradability ()
    
    11859 11904
       ;; Base classes for both regular and monolithic concatenate-source operations
    
    11860
    -  (defclass basic-concatenate-source-op (bundle-op)
    
    11861
    -    ((bundle-type :initform "lisp" :allocation :class)))
    
    11905
    +  (defclass basic-concatenate-source-op (bundle-op) ())
    
    11906
    +  (defmethod bundle-type ((o basic-concatenate-source-op)) "lisp")
    
    11862 11907
       (defclass basic-load-concatenated-source-op (basic-load-op selfward-operation) ())
    
    11863 11908
       (defclass basic-compile-concatenated-source-op (basic-compile-op selfward-operation) ())
    
    11864 11909
       (defclass basic-load-compiled-concatenated-source-op (basic-load-op selfward-operation) ())
    
    ... ... @@ -12076,7 +12121,7 @@ otherwise return a default system name computed from PACKAGE-NAME."
    12076 12121
                             previous
    
    12077 12122
                             (eval `(defsystem ,system
    
    12078 12123
                                      :class package-inferred-system
    
    12079
    -                                 :source-file nil
    
    12124
    +                                 :source-file ,(system-source-file top)
    
    12080 12125
                                      :pathname ,dir
    
    12081 12126
                                      :depends-on ,dependencies
    
    12082 12127
                                      :around-compile ,around-compile
    
    ... ... @@ -13282,10 +13327,10 @@ system or its dependencies if it has already been loaded."
    13282 13327
             :asdf/system ;; used by ECL
    
    13283 13328
             :asdf/upgrade :asdf/system-registry :asdf/operate :asdf/bundle)
    
    13284 13329
       ;; Happily, all those implementations all have the same module-provider hook interface.
    
    13285
    -  #+(or abcl clasp cmucl clozure ecl mkcl sbcl)
    
    13286
    -  (:import-from #+abcl :sys #+(or clasp cmucl ecl) :ext #+clozure :ccl #+mkcl :mk-ext #+sbcl sb-ext
    
    13287
    -		#:*module-provider-functions*
    
    13288
    -		#+ecl #:*load-hooks*)
    
    13330
    +  #+(or abcl clasp cmucl clozure ecl mezzano mkcl sbcl)
    
    13331
    +  (:import-from #+abcl :sys #+(or clasp cmucl ecl) :ext #+clozure :ccl #+mkcl :mk-ext #+sbcl sb-ext #+mezzano :sys.int
    
    13332
    +                #:*module-provider-functions*
    
    13333
    +                #+ecl #:*load-hooks*)
    
    13289 13334
       #+(or clasp mkcl) (:import-from :si #:*load-hooks*))
    
    13290 13335
     
    
    13291 13336
     (in-package :asdf/footer)
    
    ... ... @@ -13299,7 +13344,7 @@ system or its dependencies if it has already been loaded."
    13299 13344
     
    
    13300 13345
     
    
    13301 13346
     ;;;; Hook ASDF into the implementation's REQUIRE and other entry points.
    
    13302
    -#+(or abcl clasp clisp clozure cmucl ecl mkcl sbcl)
    
    13347
    +#+(or abcl clasp clisp clozure cmucl ecl mezzano mkcl sbcl)
    
    13303 13348
     (with-upgradability ()
    
    13304 13349
       ;; Hook into CL:REQUIRE.
    
    13305 13350
       #-clisp (pushnew 'module-provide-asdf *module-provider-functions*)
    
    ... ... @@ -13319,15 +13364,15 @@ system or its dependencies if it has already been loaded."
    13319 13364
         (setf (gethash 'module-provide-asdf *wrapped-module-provider*) 'module-provide-asdf)
    
    13320 13365
         (defun wrap-module-provider (provider name)
    
    13321 13366
           (let ((results (multiple-value-list (funcall provider name))))
    
    13322
    -	(when (first results) (register-preloaded-system (coerce-name name)))
    
    13323
    -	(values-list results)))
    
    13367
    +        (when (first results) (register-preloaded-system (coerce-name name)))
    
    13368
    +        (values-list results)))
    
    13324 13369
         (defun wrap-module-provider-function (provider)
    
    13325 13370
           (ensure-gethash provider *wrapped-module-provider*
    
    13326
    -		      (constantly
    
    13327
    -		       #'(lambda (module-name)
    
    13328
    -			   (wrap-module-provider provider module-name)))))
    
    13371
    +                      (constantly
    
    13372
    +                       #'(lambda (module-name)
    
    13373
    +                           (wrap-module-provider provider module-name)))))
    
    13329 13374
         (setf *module-provider-functions*
    
    13330
    -	  (mapcar #'wrap-module-provider-function *module-provider-functions*))))
    
    13375
    +          (mapcar #'wrap-module-provider-function *module-provider-functions*))))
    
    13331 13376
     
    
    13332 13377
     #+cmucl ;; Hook into the CMUCL herald.
    
    13333 13378
     (with-upgradability ()
    

  • src/contrib/asdf/doc/asdf.html
    ... ... @@ -277,7 +277,7 @@ ul.no-bullet {list-style: none}
    277 277
     <a name="Top"></a>
    
    278 278
     <a name="ASDF_003a-Another-System-Definition-Facility"></a>
    
    279 279
     <h1 class="top">ASDF: Another System Definition Facility</h1>
    
    280
    -<p>Manual for Version 3.3.1
    
    280
    +<p>Manual for Version 3.3.2
    
    281 281
     </p>
    
    282 282
     
    
    283 283
     <p>This manual describes ASDF, a system definition facility
    
    ... ... @@ -6047,9 +6047,10 @@ see the <samp>TODO</samp> file in the source repository.
    6047 6047
       Available in updated-for-CL form on the web at
    
    6048 6048
       <a href="http://nhplace.com/kent/Papers/Large-Systems.html">http://nhplace.com/kent/Papers/Large-Systems.html</a>
    
    6049 6049
     </li><li> Dan Weinreb and David Moon:
    
    6050
    -  &ldquo;Lisp Machine Manual&rdquo;, MIT, 1981.
    
    6050
    +  &ldquo;Lisp Machine Manual&rdquo;, 3rd Edition MIT, March 1981.
    
    6051 6051
       The famous CHINE NUAL describes one of the earliest variants of DEFSYSTEM.
    
    6052
    -  <a href="https://bitsavers.trailing-edge.com/pdf/mit/cadr/chinual_4thEd_Jul81.pdf">https://bitsavers.trailing-edge.com/pdf/mit/cadr/chinual_4thEd_Jul81.pdf</a>
    
    6052
    +  (NB: Not present in the second preliminary version of January 1979)
    
    6053
    +  <a href="http://bitsavers.org/pdf/mit/cadr/chinual_3rdEd_Mar81.pdf">http://bitsavers.org/pdf/mit/cadr/chinual_3rdEd_Mar81.pdf</a>
    
    6053 6054
     </li></ul>
    
    6054 6055
     
    
    6055 6056
     
    

  • src/contrib/asdf/doc/asdf.info
    ... ... @@ -43,7 +43,7 @@ File: asdf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
    43 43
     ASDF: Another System Definition Facility
    
    44 44
     ****************************************
    
    45 45
     
    
    46
    -Manual for Version 3.3.1
    
    46
    +Manual for Version 3.3.2
    
    47 47
     
    
    48 48
        This manual describes ASDF, a system definition facility for Common
    
    49 49
     Lisp programs and libraries.
    
    ... ... @@ -5544,10 +5544,11 @@ Bibliography
    5544 5544
        * Kent M. Pitman (kmp): "The Description of Large Systems", MIT AI
    
    5545 5545
          Memo 801, 1984.  Available in updated-for-CL form on the web at
    
    5546 5546
          <http://nhplace.com/kent/Papers/Large-Systems.html>
    
    5547
    -   * Dan Weinreb and David Moon: "Lisp Machine Manual", MIT, 1981.  The
    
    5548
    -     famous CHINE NUAL describes one of the earliest variants of
    
    5549
    -     DEFSYSTEM.
    
    5550
    -     <https://bitsavers.trailing-edge.com/pdf/mit/cadr/chinual_4thEd_Jul81.pdf>
    
    5547
    +   * Dan Weinreb and David Moon: "Lisp Machine Manual", 3rd Edition MIT,
    
    5548
    +     March 1981.  The famous CHINE NUAL describes one of the earliest
    
    5549
    +     variants of DEFSYSTEM. (NB: Not present in the second preliminary
    
    5550
    +     version of January 1979)
    
    5551
    +     <http://bitsavers.org/pdf/mit/cadr/chinual_3rdEd_Mar81.pdf>
    
    5551 5552
     
    
    5552 5553
     
    
    5553 5554
     File: asdf.info,  Node: Concept Index,  Next: Function and Class Index,  Prev: Bibliography,  Up: Top
    
    ... ... @@ -5999,8 +6000,8 @@ Node: ASDF development FAQs252003
    5999 6000
     Node: How do I run the tests interactively in a REPL?252242
    
    6000 6001
     Node: Ongoing Work253809
    
    6001 6002
     Node: Bibliography254088
    
    6002
    -Node: Concept Index257559
    
    6003
    -Node: Function and Class Index264554
    
    6004
    -Node: Variable Index276328
    
    6003
    +Node: Concept Index257635
    
    6004
    +Node: Function and Class Index264630
    
    6005
    +Node: Variable Index276404
    
    6005 6006
     
    
    6006 6007
     End Tag Table

  • src/contrib/asdf/doc/asdf.pdf
    No preview for this file type
  • src/general-info/release-21d.md
    ... ... @@ -19,7 +19,7 @@ public domain.
    19 19
     ## New in this release:
    
    20 20
       * Known issues:
    
    21 21
       * Feature enhancements
    
    22
    -    * Update to ASDF 3.3.1, fixing issues introduced in 3.3.0
    
    22
    +    * Update to ASDF 3.3.2
    
    23 23
       * Changes
    
    24 24
         * x86 and sparc have replaced the MT19937 RNG with xoroshiro128+ RNG.
    
    25 25
           * The required state for this generator is just 4 32-bit words instead of the 600+ for MT19937.