Commit 93760349 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

One more patch for jar files on ABCL. Hopefully this one is for good.

More documentation, notably for the answer directed towards vendors.
parent e3da9d70
......@@ -63,7 +63,7 @@
(remove "asdf" excl::*autoload-package-name-alist* :test 'equalp :key 'car))
(let* ((asdf-version
;; the 1+ hair is to ensure that we don't do an inadvertent find and replace
(subseq "VERSION:1.711" (1+ (length "VERSION"))))
(subseq "VERSION:1.712" (1+ (length "VERSION"))))
(existing-asdf (find-package :asdf))
(versym '#:*asdf-version*)
(existing-version (and existing-asdf
......@@ -2606,10 +2606,11 @@ with a different configuration, so the configuration would be re-read then."
#+sbcl (,(getenv "SBCL_HOME") ())
#+ecl (,(translate-logical-pathname "SYS:**;*.*") ()) ; only needed if LPNs are resolved manually.
#+clozure (,(wilden (ccl::ccl-directory)) ()) ; not needed: no precompiled ASDF system
#+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
#+abcl (#p"/:jar:file/**/*.*" (:user-cache #p"**/*.*"))
;; All-import, here is where we want user stuff to be:
:inherit-configuration
;; These are for convenience, and can be overridden by the user:
#+abcl (#p"/___jar___file___root___/**/*.*" (:user-cache #p"**/*.*"))
#+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
;; If we want to enable the user cache by default, here would be the place:
:enable-user-cache))
......@@ -2797,15 +2798,16 @@ effectively disabling the output translation facility."
#+abcl
(defun translate-jar-pathname (source wildcard)
(declare (ignore wildcard))
(let ((root (apply-output-translations
(concatenate 'string
"/:jar:file/"
(namestring (first (pathname-device
source))))))
(entry (make-pathname :directory (pathname-directory source)
:name (pathname-name source)
:type (pathname-type source))))
(concatenate 'string (namestring root) (namestring entry))))
(let* ((p (pathname (first (pathname-device source))))
(root (format nil "/___jar___file___root___/~@[~A/~]"
(and (find :windows *features*)
(pathname-device p)))))
(apply-output-translations
(merge-pathnames*
(relativize-pathname-directory source)
(merge-pathnames*
(relativize-pathname-directory p)
root)))))
;;;; -----------------------------------------------------------------
;;;; Compatibility mode for ASDF-Binary-Locations
......@@ -3193,7 +3195,7 @@ with a different configuration, so the configuration would be re-read then."
(initialize-source-registry)))
;;;; -----------------------------------------------------------------
;;;; SBCL and ClozureCL hook into REQUIRE
;;;; Hook into REQUIRE for SBCL, ClozureCL and ABCL
;;;;
#+(or sbcl clozure abcl)
(progn
......
......@@ -2611,7 +2611,7 @@ The :version and :feature features and
the :force (system1 .. systemN) feature have been fixed.
@item
Performance has been notably improved for very large systems
Performance has been notably improved for large systems
(say with thousands of components) by using
hash-tables instead of linear search,
and linear-time list accumulation
......@@ -2769,25 +2769,59 @@ We trust you to thoroughly test it with your implementation before you release i
If there are any issues with the current release,
it's a bug that you should report upstream and that we will fix ASAP.
As to how to include ASDF, we recommend that
if you do have a few magic systems in your implementation path,
that are specially treated in @code{wrapping-source-registry},
like SBCL does.
In this case, we explicitly ask you to @emph{NOT} distribute
@file{asdf.asd} together with your implementation's ASDF,
least you separate it from the other systems in this path,
or otherwise rename the system and its @file{asd} file
to e.g. @code{asdf-sbcl} and @file{asdf-sbcl.asd}.
As to how to include ASDF, we recommend the following:
@itemize
@item
If ASDF isn't installed yet, then @code{(require :asdf)}
should load the version of ASDF that is bundled with your system.
You may have it load some other version configured by the user,
if you allow such configuration.
@item
If your system provides a mechanism to hook into @code{CL:REQUIRE},
then it would be nice to add ASDF to this hook the same way that
SBCL, CCL and ABCL do it.
@item
You may, like SBCL, have ASDF be implicitly used to require systems
that are bundled with your Lisp distribution.
If you do have a few magic systems that come with your implementation
in a precompiled way such that one should only use the binary version
that goes with your distribution, like SBCL does,
then you should add them in the beginning of @code{wrapping-source-registry}.
@item
If you have magic systems as above, like SBCL does,
then we explicitly ask you to @emph{NOT} distribute
@file{asdf.asd} as part of those magic systems.
You should still include the file @file{asdf.lisp} in your source distribution
and precompile it in your binary distribution,
but @file{asdf.asd} if included at all,
should be secluded from the magic systems,
in a separate file hierarchy,
or you may otherwise rename the system and its file to e.g.
@code{asdf-ecl} and @file{asdf-ecl.asd}, or
@code{sb-asdf} and @file{sb-asdf.asd}.
Indeed, if you made @file{asdf.asd} a magic system,
then users would no longer be able to upgrade ASDF using ASDF itself
to some version of their preference that
they maintain independently from your Lisp distribution.
@item
If you do not have any such magic systems, or have other non-magic systems
that you want to bundle with your implementation,
then you may add them to the @code{default-source-registry},
and you are welcome to include @file{asdf.asd} amongst them.
Please send upstream any patches you make to ASDF itself,
@item
Please send us upstream any patches you make to ASDF itself,
so we can merge them back in for the benefit of your users
when they upgrade to the upstream version.
@end itemize
@section Issues with configuring ASDF
......
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