Commit 90cda860 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.26.147: allow the disabling of warnings collection. Enhance ABL compatibility.

Also, cleanup and documentation of deferred-warnings support.
parent db1cebf7
......@@ -59,7 +59,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.26.146" ;; to be automatically updated by make bump-version
:version "2.26.147" ;; to be automatically updated by make bump-version
:depends-on ()
:components
((:module "build"
......
......@@ -73,13 +73,18 @@ if that's whay you mean." ;;)
(subpathname (user-homedir) ".fasls/")) ;; Use ".cache/common-lisp/" instead ???
(include-per-user-information nil)
(map-all-source-files (or #+(or clisp ecl mkcl) t nil))
(source-to-target-mappings nil))
(source-to-target-mappings nil)
(file-types (list (compile-file-type)
#+ecl (compile-file-type :type :object)
#+mkcl (compile-file-type :fasl-p nil)
#+clisp "lib" #+sbcl "cfasl"
#+sbcl "sbcl-warnings" #+clozure "ccl-warnings")))
#+(or clisp ecl mkcl)
(when (null map-all-source-files)
(error "asdf:enable-asdf-binary-locations-compatibility doesn't support :map-all-source-files nil on CLISP, ECL and MKCL"))
(let* ((fasl-type (compile-file-type))
(mapped-files (if map-all-source-files *wild-file*
(make-pathname :type fasl-type :defaults *wild-file*)))
(let* ((patterns (if map-all-source-files (list *wild-file*)
(loop :for type :in file-types
:collect (make-pathname :type type :defaults *wild-file*))))
(destination-directory
(if centralize-lisp-binaries
`(,default-toplevel-directory
......@@ -92,8 +97,9 @@ if that's whay you mean." ;;)
,@source-to-target-mappings
#+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
#+abcl (#p"/___jar___file___root___/**/*.*" (,@destination-directory))
((:root ,*wild-inferiors* ,mapped-files)
(,@destination-directory ,mapped-files))
,(loop :for pattern :in patterns
:collect `((:root ,*wild-inferiors* ,pattern)
(,@destination-directory ,pattern)))
(t t)
:ignore-inherited-configuration))))
......
......@@ -5,6 +5,7 @@ Maintainer: Debian Common Lisp Team <pkg-common-lisp-devel@lists.alioth.debian.o
Uploaders: Peter Van Eynde <pvaneynd@debian.org>,
Milan Zamazal <pdm@zamazal.org>,
Christoph Egger <christoph@debian.org>,
Julien Danjou <acid@debian.org>,
Francois-Rene Rideau <fare@tunes.org>
Build-Depends: debhelper (>> 7)
Build-Depends-Indep: texinfo, texlive-extra-utils, texlive, texlive-generic-recommended
......
;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.26.146: Another System Definition Facility.
;;; This is ASDF 2.26.147: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -127,6 +127,7 @@
#:apply-output-translations
#:compile-file*
#:compile-file-pathname*
#:*warnings-file-type*
#:enable-asdf-binary-locations-compatibility
#:*default-source-registries*
#:*source-registry-parameter*
......
......@@ -14,7 +14,6 @@
#:compile-warned-warning #:compile-failed-warning
#:check-lisp-compile-results #:check-lisp-compile-warnings
#:*uninteresting-compiler-conditions* #:*uninteresting-loader-conditions*
#:*deferred-warnings*
;; Functions & Macros
#:get-optimization-settings #:proclaim-optimization-settings
#:call-with-muffled-compiler-conditions #:with-muffled-compiler-conditions
......@@ -22,7 +21,7 @@
#:reify-simple-sexp #:unreify-simple-sexp
#:reify-deferred-warnings #:reify-undefined-warning #:unreify-deferred-warnings
#:reset-deferred-warnings #:save-deferred-warnings #:check-deferred-warnings
#:with-saved-deferred-warnings #:warnings-file-p #:warnings-file-type
#:with-saved-deferred-warnings #:warnings-file-p #:warnings-file-type #:*warnings-file-type*
#:call-with-asdf-compilation-unit #:with-asdf-compilation-unit
#:current-lisp-file-pathname #:load-pathname
#:lispize-pathname #:compile-file-type #:call-around-hook
......@@ -110,9 +109,6 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
#+clisp '(clos::simple-gf-replacing-method-warning))
"Additional conditions that may be skipped while loading")
(defvar *deferred-warnings* ()
"Warnings the handling of which is deferred until the end of the compilation unit")
;;;; ----- Filtering conditions while building -----
(defun* call-with-muffled-compiler-conditions (thunk)
......@@ -181,6 +177,10 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
;;;; Deferred-warnings treatment, originally implemented by Douglas Katzman.
;;
;; To support an implementation, three functions must be implemented:
;; reify-deferred-warnings unreify-deferred-warnings reset-deferred-warnings
;; See their respective docstrings.
(defun reify-simple-sexp (sexp)
(etypecase sexp
......@@ -245,6 +245,9 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
(sb-c::undefined-warning-warnings warning))))
(defun reify-deferred-warnings ()
"return a portable S-expression, portably readable and writeable in any Common Lisp implementation
using READ within a WITH-SAFE-IO-SYNTAX, that represents the warnings currently deferred by
WITH-COMPILATION-UNIT. One of three functions required for deferred-warnings support in ASDF."
#+clozure
(mapcar 'reify-deferred-warning
(if-let (dw ccl::*outstanding-deferred-warnings*)
......@@ -266,6 +269,11 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
:collect `(,what . ,value)))))
(defun unreify-deferred-warnings (reified-deferred-warnings)
"given a S-expression created by REIFY-DEFERRED-WARNINGS, reinstantiate the corresponding
deferred warnings as to be handled at the end of the current WITH-COMPILATION-UNIT.
Handle any warning that has been resolved already,
such as an undefined function that has been defined since.
One of three functions required for deferred-warnings support in ASDF."
(declare (ignorable reified-deferred-warnings))
#+clozure
(let ((dw (or ccl::*outstanding-deferred-warnings*
......@@ -300,6 +308,8 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
(set symbol (+ (symbol-value symbol) adjustment)))))))
(defun reset-deferred-warnings ()
"Reset the set of deferred warnings to be handled at the end of the current WITH-COMPILATION-UNIT.
One of three functions required for deferred-warnings support in ASDF."
#+clozure
(if-let (dw ccl::*outstanding-deferred-warnings*)
(let ((mdw (ccl::ensure-merged-deferred-warnings dw)))
......@@ -327,8 +337,13 @@ possibly in a different process."
(:sbcl "sbcl-warnings")
((:clozure :ccl) "ccl-warnings")))
(defvar *warnings-file-type* (warnings-file-type)
"Type for warnings files")
(defun* warnings-file-p (file &optional implementation-type)
(if-let (type (warnings-file-type implementation-type))
(if-let (type (if implementation-type
(warnings-file-type implementation-type)
*warnings-file-type*))
(equal (pathname-type file) type)))
(defun* check-deferred-warnings (files &optional context-format context-arguments)
......@@ -379,8 +394,7 @@ report-deferred-warnings
(defun* call-with-saved-deferred-warnings (thunk warnings-file)
(if warnings-file
(with-compilation-unit (:override t)
(let ((*deferred-warnings* ())
#+sbcl (sb-c::*undefined-warnings* nil))
(let (#+sbcl (sb-c::*undefined-warnings* nil))
(multiple-value-prog1
(with-muffled-compiler-conditions ()
(funcall thunk))
......
;;; -*- Lisp -*-
(asdf:load-system 'test-module-depend)
(load-system 'test-module-depend)
;; test that it compiled
(defparameter file1.fasl (test-fasl "file1"))
(defparameter file2.fasl (test-fasl "file2"))
(defparameter file3.fasl (test-fasl "file3"))
(defparameter file1.fasl (first (output-files 'compile-op '(test-module-depend "file1"))))
(defparameter file2.fasl (first (output-files 'compile-op '(test-module-depend "quux" "file2"))))
(defparameter file3.fasl (first (output-files 'compile-op '(test-module-depend "quux" "file3mod" "file3"))))
(defparameter file1-date (file-write-date file1.fasl))
(defparameter file3-date (file-write-date file3.fasl))
(assert-pathname-equal file1.fasl (test-fasl "file1"))
(assert-pathname-equal file2.fasl (test-fasl "file2"))
(assert-pathname-equal file3.fasl (test-fasl "file3"))
(assert (and file1-date file3-date))
......@@ -25,6 +26,6 @@
(touch-file file2.fasl :timestamp (- file3-date 30))
(touch-file file3.fasl :timestamp (- file3-date 15))
(asdf:operate 'asdf:load-op 'test-module-depend)
(assert (>= (file-write-date (test-fasl "file2")) file3-date))
(assert (>= (file-write-date file2.fasl) file3-date))
;; does this properly go to the second level?
(assert (>= (file-write-date (test-fasl "file3")) file3-date))
(assert (>= (file-write-date file3.fasl) file3-date))
......@@ -4,15 +4,15 @@
(defparameter test1.asd (system-source-file 'test1))
(defparameter file1.lisp (component-pathname (find-component 'test1 "file1")))
(defparameter file2.lisp (component-pathname (find-component 'test1 "file2")))
(assert-equal test1.asd (test-source "test1.asd")) ; unhappily, not usually equal.
(assert-equal file1.lisp (test-source "file1.lisp")) ; unhappily, not usually equal.
(assert-equal file2.lisp (test-source "file2.lisp")) ; unhappily, not usually equal.
(assert-pathname-equal test1.asd (test-source "test1.asd")) ; unhappily, not usually equal.
(assert-pathname-equal file1.lisp (test-source "file1.lisp")) ; unhappily, not usually equal.
(assert-pathname-equal file2.lisp (test-source "file2.lisp")) ; unhappily, not usually equal.
(defparameter *file1.out* (output-files 'compile-op '(test1 "file1")))
(defparameter *file2.out* (output-files 'compile-op '(test1 "file2")))
(defparameter file1.fasl (first *file1.out*))
(defparameter file2.fasl (first *file2.out*))
(assert-equal file1.fasl (test-fasl "file1"))
(assert-equal file2.fasl (test-fasl "file2"))
(assert-pathname-equal file1.fasl (test-fasl "file1"))
(assert-pathname-equal file2.fasl (test-fasl "file2"))
(defparameter *date* (- (file-write-date test1.asd) 3600))
(touch-file test1.asd :timestamp *date*) ;; touch test1.asd an hour back.
......
......@@ -35,7 +35,7 @@
;; "2.345.6" would be a development version in the official upstream
;; "2.345.0.7" would be your seventh local modification of official release 2.345
;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
(asdf-version "2.26.146")
(asdf-version "2.26.147")
(existing-asdf (find-class (find-symbol* :component :asdf nil) nil))
(existing-version *asdf-version*)
(already-there (equal asdf-version existing-version))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment