Skip to content
Snippets Groups Projects
Commit 813549e7 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

2.28.5: make upgrade work better for CCL with setf component-version.

This is kind of a kluge: use slot-value in parse-component-form
instead of a proper accessor.
A better fix is required in the long term, but this will do for now.
parent 49b1eb1d
No related branches found
No related tags found
No related merge requests found
* have a single test .asd that tests as many features as possible, use it for upgrade test.
* implement deferred warnings support on abcl, allegro, clisp, cmucl, lispworks, scl) * implement deferred warnings support on abcl, allegro, clisp, cmucl, lispworks, scl)
* fix upgrade on clisp * fix upgrade on clisp
** Extract minimal test case ** Extract minimal test case
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
:licence "MIT" :licence "MIT"
:description "Another System Definition Facility" :description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems." :long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.28.4" ;; to be automatically updated by make bump-version :version "2.28.5" ;; to be automatically updated by make bump-version
:depends-on () :depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8 #+asdf3 :encoding #+asdf3 :utf-8
;; For most purposes, asdf itself specially counts as a builtin system. ;; For most purposes, asdf itself specially counts as a builtin system.
......
...@@ -53,6 +53,8 @@ another pathname in a degenerate way.")) ...@@ -53,6 +53,8 @@ another pathname in a degenerate way."))
(defgeneric component-external-format (component)) (defgeneric component-external-format (component))
(defgeneric component-encoding (component)) (defgeneric component-encoding (component))
(defgeneric version-satisfies (component version)) (defgeneric version-satisfies (component version))
(defgeneric component-version (component))
(defgeneric (setf component-version) (new-version component))
;; Backward compatible way of computing the FILE-TYPE of a component. ;; Backward compatible way of computing the FILE-TYPE of a component.
;; TODO: find users, have them stop using that, remove it for ASDF4. ;; TODO: find users, have them stop using that, remove it for ASDF4.
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
;;; Main parsing function ;;; Main parsing function
(with-upgradability () (with-upgradability ()
(defun parse-component-form (parent options &key previous-serial-component) (defun* (parse-component-form) (parent options &key previous-serial-component)
(destructuring-bind (destructuring-bind
(type name &rest rest &key (type name &rest rest &key
(builtin-system-p () bspp) (builtin-system-p () bspp)
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
(when (and versionp version (not (parse-version version nil))) (when (and versionp version (not (parse-version version nil)))
(warn (compatfmt "~@<Invalid version ~S for component ~S~@[ of ~S~]~@:>") (warn (compatfmt "~@<Invalid version ~S for component ~S~@[ of ~S~]~@:>")
version name parent)) version name parent))
(setf (component-version component) version) ;; Don't use the accessor: kluge to avoid upgrade issue on CCL 1.8.
;; A better fix is required.
(setf (slot-value component 'version) version)
(when (typep component 'parent-component) (when (typep component 'parent-component)
(setf (component-children component) (setf (component-children component)
(loop (loop
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.28.4: Another System Definition Facility. ;;; This is ASDF 2.28.5: Another System Definition Facility.
;;; ;;;
;;; Feedback, bug reports, and patches are all welcome: ;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>. ;;; please mail to <asdf-devel@common-lisp.net>.
......
...@@ -545,7 +545,7 @@ is bound, write a message and exit on an error. If ...@@ -545,7 +545,7 @@ is bound, write a message and exit on an error. If
(funcall new-method) (funcall new-method)
(format t "Testing it~%") (format t "Testing it~%")
(register-directory *test-directory*) (register-directory *test-directory*)
(load-test-system :test-module-depend) (load-test-system :test-asdf/all)
(assert (asymval '#:*file1* :test-package)) (assert (asymval '#:*file1* :test-package))
(assert (asymval '#:*file3* :test-package)))) (assert (asymval '#:*file3* :test-package))))
......
...@@ -2,13 +2,45 @@ ...@@ -2,13 +2,45 @@
(:use :cl :asdf)) (:use :cl :asdf))
(in-package :test-asdf-system) (in-package :test-asdf-system)
(defsystem :test-asdf (defsystem :test-asdf)
:components ())
(defsystem :test-asdf/all
:version "0"
:depends-on ((:version :test-asdf/file2 "2")
:test-asdf/file4))
(defsystem :test-asdf/file1
:components ((:file "file1")))
(defsystem :test-asdf/file2
:version "2.2"
:depends-on (:test-asdf/file1)
:components ((:module "foo" :pathname ""
:components ((:module "bar" :pathname ""
:components ((:file "file2")))))))
(defsystem :test-asdf/file4
:components ((:file "file3")
(:file "file4" :in-order-to ((load-op (load-op "file3"))
(compile-op (load-op "file3"))))))
(defsystem :test-asdf/test9-1 (defsystem :test-asdf/test9-1
:version "1.1" :version "1.1"
:components ((:file "file2")) :components ((:file "file2"))
:depends-on ((:version :test-asdf/test9-2 "2.0"))) :depends-on ((:version :test-asdf/test9-2 "2.0")))
(defsystem :test-asdf/test-module-depend
:components
((:file "file1")
(:module "quux"
:pathname ""
:depends-on ("file1")
:components
((:file "file2")
(:module "file3mod"
:pathname ""
:components
((:file "file3")))))))
(defsystem :test-asdf/test9-2 (defsystem :test-asdf/test9-2
:version "1.0" :version "1.0"
......
...@@ -39,7 +39,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ...@@ -39,7 +39,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
(defun upgrading-p () (defun upgrading-p ()
(and *previous-asdf-versions* (not (equal *asdf-version* (first *previous-asdf-versions*))))) (and *previous-asdf-versions* (not (equal *asdf-version* (first *previous-asdf-versions*)))))
(defmacro when-upgrading ((&key (upgrading-p '(upgrading-p)) when) &body body) (defmacro when-upgrading ((&key (upgrading-p '(upgrading-p)) when) &body body)
`(eval-when (:compile-toplevel :load-toplevel :execute) `(with-upgradability ()
(when (and ,upgrading-p ,@(when when `(,when))) (when (and ,upgrading-p ,@(when when `(,when)))
(handler-bind ((style-warning #'muffle-warning)) (handler-bind ((style-warning #'muffle-warning))
(eval '(progn ,@body)))))) (eval '(progn ,@body))))))
...@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ...@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
;; "3.4.5.67" would be a development version in the official upstream of 3.4.5. ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(asdf-version "2.28.4") (asdf-version "2.28.5")
(existing-version (asdf-version))) (existing-version (asdf-version)))
(setf *asdf-version* asdf-version) (setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version))) (when (and existing-version (not (equal asdf-version existing-version)))
...@@ -72,6 +72,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ...@@ -72,6 +72,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
#:component-depends-on #:component-self-dependencies #:operation-done-p #:component-depends-on #:component-self-dependencies #:operation-done-p
#:traverse ;; plan #:traverse ;; plan
#:operate ;; operate #:operate ;; operate
#:parse-component-form ;; defsystem
#:apply-output-translations ;; output-translations #:apply-output-translations ;; output-translations
#:process-output-translations-directive #:process-output-translations-directive
#:inherit-source-registry #:process-source-registry ;; source-registry #:inherit-source-registry #:process-source-registry ;; source-registry
......
"2.28.4" "2.28.5"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment