Commit 95f4085f authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.26.65: Much progress on define-package. Basically working, except with using packages.

parent 056f33a9
......@@ -3,6 +3,15 @@
* Split ASDF in parts
** Have it pass test-lisp
** Have it pass test-upgrade
** Get package upgrade right
** The unconditional ensure-package-unused breaks test-encodings.script,
since asdf severs itself from its client package hosting the
defsystem form during defsystem-depends-on.
** Solution 1: emulate hook on the *upgraded-p* solution, either using
explicit flag, explicit version numbers or implicit version information
(e.g. source-code or sxhash thereof, also accounting for dependency
package information).
** Solution 2: Just "do the right thing" with exported symbols.
* Make load-op a generic operation that selects the proper strategy
for each system, module or file, according to component properties and user-configuration:
compile the lisp file then load the fasl (load-compiled-op),
......
;;;; -------------------------------------------------------------------------
;;;; Actions
(defpackage :asdf/action
(asdf/package:define-package :asdf/action
(:recycle :asdf/action :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/pathname :asdf/os
:asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation)
#+gcl<2.7 (:shadowing-import-from :asdf/implementation #:type-of)
......
......@@ -14,7 +14,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.26.64" ;; to be automatically updated by bin/bump-revision
:version "2.26.65" ;; to be automatically updated by bin/bump-revision
:depends-on ()
:components
((:file "asdf")))
......
;;;; -------------------------------------------------------------------------
;;; Backward-compatible interfaces
(defpackage :asdf/backward-interface
(asdf/package:define-package :asdf/backward-interface
(:recycle :asdf/backward-interface :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/pathname :asdf/os
:asdf/component :asdf/system :asdf/operation :asdf/action
:asdf/lisp-build :asdf/operate :asdf/output-translations)
......@@ -15,7 +16,6 @@
#:operation-on-warnings
#:run-shell-command
#:system-definition-pathname))
(in-package :asdf/backward-interface)
(defvar *asdf-verbose* nil) ; worked around by cl-protobufs. It was a mistake to introduce it. mea culpa -fare
......
;;;; -------------------------------------------------------------------------
;;; Internal hacks for backward-compatibility
(defpackage :asdf/backward-internals
(asdf/package:define-package :asdf/backward-internals
(:recycle :asdf/backward-internals :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/pathname
:asdf/system :asdf/component :asdf/find-system :asdf/action)
(:export ;; for internal use
......
;;;; -------------------------------------------------------------------------
;;;; ASDF-Bundle
(defpackage :asdf/bundle
(asdf/package:define-package :asdf/bundle
(:recycle :asdf/bundle :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build
:asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation
:asdf/action :asdf/lisp-action :asdf/plan :asdf/operate)
......
;;;; -------------------------------------------------------------------------
;;;; Components
(defpackage :asdf/component
(asdf/package:define-package :asdf/component
(:recycle :asdf/component :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/pathname :asdf/upgrade)
(:export
#:component #:component-find-path
......@@ -19,8 +20,7 @@
#:component-external-format #:component-encoding
#:detect-encoding #:*encoding-detection-hook* #:always-default-encoding
#:encoding-external-format #:*encoding-external-format-hook* #:default-encoding-external-format
#:*default-encoding* #:*utf-8-external-format*
))
#:*default-encoding* #:*utf-8-external-format*))
(in-package :asdf/component)
(defgeneric* component-name (component)
......
;;;; -------------------------------------------------------------------------
;;;; Concatenate-source
(defpackage :asdf/concatenate-source
(asdf/package:define-package :asdf/concatenate-source
(:recycle :asdf/concatenate-source :asdf)
(:use :common-lisp :asdf/utility :asdf/os
:asdf/component :asdf/operation :asdf/system :asdf/find-system :asdf/defsystem
:asdf/action :asdf/lisp-action :asdf/bundle)
......
;;;; ---------------------------------------------------------------------------
;;;; Generic support for configuration files
(defpackage :asdf/configuration
(asdf/package:define-package :asdf/configuration
(:recycle :asdf/configuration :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os)
(:export
#:get-folder-path
......@@ -13,8 +14,7 @@
#:report-invalid-form #:invalid-configuration #:*ignored-configuration-form*
#:*clear-configuration-hook* #:clear-configuration
#:resolve-location #:location-designator-p #:location-function-p #:*here-directory*
#:resolve-relative-location-component #:resolve-absolute-location-component
))
#:resolve-relative-location-component #:resolve-absolute-location-component))
(in-package :asdf/configuration)
(define-condition invalid-configuration ()
......
;;;; -------------------------------------------------------------------------
;;;; Defsystem
(defpackage :asdf/defsystem
(asdf/package:define-package :asdf/defsystem
(:recycle :asdf/defsystem :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname
:asdf/component :asdf/system :asdf/find-system :asdf/find-component
:asdf/lisp-action :asdf/operate
......@@ -9,8 +10,7 @@
#+gcl<2.7 (:shadowing-import-from :asdf/implementation #:type-of)
(:export
#:defsystem #:do-defsystem #:parse-component-form
#:*default-component-class*
))
#:*default-component-class*))
(in-package :asdf/defsystem)
;;; Pathname
......
;;;; -------------------------------------------------------------------------
;;;; Finding components
(defpackage :asdf/find-component
(asdf/package:define-package :asdf/find-component
(:recycle :asdf/find-component :asdf)
(:use :common-lisp :asdf/utility :asdf/os
:asdf/component :asdf/system :asdf/find-system)
(:export
......@@ -12,9 +13,7 @@
#:missing-component #:missing-component-of-version #:retry
#:missing-dependency #:missing-dependency-of-version
#:missing-requires #:missing-parent
#:missing-required-by #:missing-version
))
#:missing-required-by #:missing-version))
(in-package :asdf/find-component)
;;;; Missing component conditions
......
;;;; -------------------------------------------------------------------------
;;;; Finding systems
(defpackage :asdf/find-system
(asdf/package:define-package :asdf/find-system
(:recycle :asdf/find-system :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/upgrade :asdf/pathname :asdf/os
:asdf/component :asdf/system)
(:export
......
;;;; -----------------------------------------------------------------------
;;;; ASDF Footer: last words and cleanup
(defpackage :asdf/footer
(asdf/package:define-package :asdf/footer
(:recycle :asdf/footer :asdf)
(:use :common-lisp
:asdf/package :asdf/implementation
:asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build
......
......@@ -53,5 +53,5 @@
(:file "bundle" :depends-on ("lisp-action"))
(:file "concatenate-source" :depends-on ("lisp-action"))
(:file "backward-interface" :depends-on ("lisp-action"))))
(:file "user")
(:file "interface")
(:file "footer" :depends-on ("interface"))))
;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
;;; This is ASDF 2.26.64: Another System Definition Facility.
;;; This is ASDF 2.26.65: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
;;;; -------------------------------------------------------------------------
;;;; Handle ASDF portability to multiple implementations
(defpackage :asdf/implementation
(asdf/package:define-package :asdf/implementation
(:use :common-lisp :asdf/package)
(:recycle :asdf/implementation :asdf)
#+cormanlisp
(:export
#:logical-pathname #:translate-logical-pathname
......
;;;; ---------------------------------------------------------------------------
;;;; Handle ASDF package upgrade, including implementation-dependent magic.
(defpackage :asdf/interface
(asdf/package:define-package :asdf/interface
(:recycle :asdf/interface :asdf)
(:nicknames :asdf)
(:use :common-lisp
:asdf/package :asdf/implementation :asdf/utility :asdf/pathname :asdf/os :asdf/upgrade
......@@ -127,7 +128,6 @@
#:system-source-registry
#:user-source-registry-directory
#:system-source-registry-directory))
(in-package :asdf/interface)
(with-upgrade (:when (fboundp 'make-sub-operation))
......
;;;; -------------------------------------------------------------------------
;;;; Actions to build Common Lisp software
(defpackage :asdf/lisp-action
(asdf/package:define-package :asdf/lisp-action
(:recycle :asdf/lisp-action :asdf)
(:use :common-lisp :asdf/utility :asdf/lisp-build
:asdf/component :asdf/system :asdf/find-component :asdf/operation :asdf/action)
(:export
......
;;;; -------------------------------------------------------------------------
;;;; Support to build (compile and load) Lisp files
(defpackage :asdf/lisp-build
(asdf/package:define-package :asdf/lisp-build
(:recycle :asdf/lisp-build :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os)
(:export
#:*compile-file-warnings-behaviour* #:*compile-file-failure-behaviour*
......
;;;; -------------------------------------------------------------------------
;;;; Invoking Operations
(defpackage :asdf/operate
(asdf/package:define-package :asdf/operate
(:recycle :asdf/operate :asdf)
(:use :common-lisp :asdf/implementation :asdf/utility :asdf/upgrade
:asdf/component :asdf/system :asdf/operation :asdf/action
:asdf/lisp-build :asdf/lisp-action #:asdf/plan
......
;;;; -------------------------------------------------------------------------
;;;; Operations
(defpackage :asdf/operation
(asdf/package:define-package :asdf/operation
(:recycle :asdf/operation :asdf)
(:use :common-lisp :asdf/utility :asdf/upgrade)
(:export
#:operation
#:operation-original-initargs ;; backward-compatibility only. DO NOT USE.
#:make-operation
#:find-operation))
(in-package :asdf/operation)
;;; Operation Classes
......
;;;; ---------------------------------------------------------------------------
;;;; Access to the Operating System
(defpackage :asdf/os
;;;; Access to the Operating System
(asdf/package:define-package :asdf/os
(:recycle :asdf/os :asdf)
(:use :cl :asdf/package :asdf/implementation :asdf/utility :asdf/pathname)
(:export
#:featurep #:os-unix-p #:os-windows-p ;; features
......
;;;; ---------------------------------------------------------------------------
;;;; asdf-output-translations
(defpackage :asdf/output-translations
(asdf/package:define-package :asdf/output-translations
(:recycle :asdf/output-translations :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/configuration :asdf/action)
(:export
#:invalid-output-translation
......
This diff is collapsed.
(defpackage :asdf/pathname
;;;; -------------------------------------------------------------------------
;;;; Portability layer around Common Lisp pathnames
(asdf/package:define-package :asdf/pathname
(:recycle :asdf/pathname :asdf)
(:use :common-lisp :asdf/utility)
#+gcl<2.7 (:shadowing-import-from :system :*load-pathname*) ;; GCL 2.6 sucks
(:export
......
;;;; -------------------------------------------------------------------------
;;;; Plan
(cl:defpackage :asdf/plan
(asdf/package:define-package :asdf/plan
(:recycle :asdf/plan :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os
:asdf/component :asdf/system :asdf/find-system :asdf/find-component
:asdf/operation :asdf/action)
......@@ -18,8 +19,7 @@
#:call-while-visiting-action #:while-visiting-action
#:traverse-sequentially #:traverse
#:perform-plan #:plan-operates-on-p))
(cl:in-package :asdf/plan)
(in-package :asdf/plan)
;;;; Planned action status
......
......@@ -2,7 +2,8 @@
;;;; Source Registry Configuration, by Francois-Rene Rideau
;;;; See the Manual and https://bugs.launchpad.net/asdf/+bug/485918
(defpackage :asdf/source-registry
(asdf/package:define-package :asdf/source-registry
(:recycle :asdf/source-registry :asdf)
(:use :common-lisp :asdf/implementation :asdf/configuration :asdf/utility :asdf/pathname :asdf/os
:asdf/find-system)
(:export
......@@ -20,8 +21,7 @@
#:user-source-registry-directory #:system-source-registry-directory
#:environment-source-registry #:process-source-registry
#:compute-source-registry #:flatten-source-registry
#:sysdef-source-registry-search
))
#:sysdef-source-registry-search))
(in-package :asdf/source-registry)
(define-condition invalid-source-registry (invalid-configuration warning)
......
;;;; -------------------------------------------------------------------------
;;;; Systems
(defpackage :asdf/system
(asdf/package:define-package :asdf/system
(:recycle :asdf/system :asdf)
(:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/upgrade
:asdf/component)
(:export
......
......@@ -2,7 +2,8 @@
;;;; Handle upgrade as forward- and backward-compatibly as possible
;; See https://bugs.launchpad.net/asdf/+bug/485687
(defpackage :asdf/upgrade
(asdf/package:define-package :asdf/upgrade
(:recycle :asdf/upgrade :asdf)
(:use :common-lisp :asdf/package :asdf/implementation :asdf/utility)
(:export
#:upgrade-asdf #:asdf-upgrade-error #:with-upgrade
......@@ -23,7 +24,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.64")
(asdf-version "2.26.65")
(existing-asdf (find-class 'component nil))
(existing-version *asdf-version*)
(already-there (equal asdf-version existing-version)))
......
;;;; -------------------------------------------------------------------------
;;;; General Purpose Utilities for ASDF
(defpackage :asdf/utility
(asdf/package:define-package :asdf/utility
(:recycle :asdf/utility :asdf)
(:use :common-lisp :asdf/package :asdf/implementation)
(:export
#:find-symbol* ;; reexport from asdf/package
......@@ -16,8 +17,7 @@
#:later-stamp #:stamps-latest #:latest-stamp #:latest-stamp-f
#:list-to-hash-set ;; hash-table
#:ensure-function ;; functions
#:parse-version #:version-compatible-p ;; version
))
#:parse-version #:version-compatible-p)) ;; version
(in-package :asdf/utility)
;;; *-defining macros
......
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