source: trunk/abcl/contrib/asdf-jar/README.markdown

Last change on this file was 15686, checked in by Mark Evenson, 13 months ago

asdf-jar: extensive grouting of accumulated bitrot

Source ASDF systems residing in jar files may now be repackaged, as
was the usually case for JSS which prompted this rework.

We now neither package nor read fasls from jar files by default for
two reasons. First, configuring ASDF to not compile systems seems to
have changed somewhat, so the finagling of output translations no
longer seems to work. Secondly, since the Lisp compiler is always
present at runtime, fasls can always be created provided that ASDF has
writable local directory, which would probably be true in almost
all (?) deployment scenarios.

We now attempt to package non-source artifacts declared in system
definitions via asdf components that are files but not compiled
artifacts as well as those which appear in the
ASDF/COMPONENT::ADDITIONAL-INPUT-FILES slot.

We have removed use of ASDF internal symbols as much as possible, but
alas still use a couple internal interfaces where unavoidable.

We no longer use the deprecated ASDF:*CENTRAL-REGISTRY* to add systems
to the source registry.

Resolves <https://github.com/armedbear/abcl/issues/476>.

File size: 3.2 KB
Line 
1ASDF-JAR
2========
3
4ASDF-JAR provides a system for packaging ASDF systems into jar
5archives for ABCL.  Given a running ABCL image with loadable ASDF
6systems the code in this package will recursively package all the
7required source and fasls in a jar archive .
8
9To install ASDF systems, [Quicklisp]() is probably the best
10contemporary solution.  The QUICKLISP-ABCL <file:../quicklisp-abcl>
11may be used to install Quicklisp at runtime from within ABCL.
12
13[Quicklisp]: http://www.quicklisp.org
14
15Once the requisite ASDF systems have been installed, ensure that this
16contrib is loaded via
17
18    CL-USER) (require :abcl-contrib)
19    CL-USER> (asdf:make :asdf-jar)
20
21Then, one may package any locally loadable ASDF system via
22ASDF-JAR:PACKAGE as follows:
23
24     CL-USER> (asdf-jar:package :chunga :verbose t)
25     Packaging ASDF definition of #<ASDF/SYSTEM:SYSTEM "chunga">
26     Performing unforced compilation of /var/tmp/chunga-all-1.1.7.jar.
27     Packaging contents in '/var/tmp/chunga-all-1.1.7.jar'.
28     Packaging with recursive dependencies #<ASDF/SYSTEM:SYSTEM "trivial-gray-streams">.
29     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/streams.lisp
30      =>chunga/streams.lisp
31     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/input.lisp
32      =>chunga/input.lisp
33     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/specials.lisp
34      =>chunga/specials.lisp
35     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/known-words.lisp
36      =>chunga/known-words.lisp
37     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/util.lisp
38      =>chunga/util.lisp
39     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/read.lisp
40      =>chunga/read.lisp
41     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/output.lisp
42      =>chunga/output.lisp
43     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/conditions.lisp
44      =>chunga/conditions.lisp
45     /Users/evenson/quicklisp/dists/quicklisp/software/chunga-20221106-git/packages.lisp
46      =>chunga/packages.lisp
47     /Users/evenson/quicklisp/dists/quicklisp/software/trivial-gray-streams-20210124-git/streams.lisp
48      =>trivial-gray-streams/streams.lisp
49     /Users/evenson/quicklisp/dists/quicklisp/software/trivial-gray-streams-20210124-git/package.lisp
50      =>trivial-gray-streams/package.lisp
51     #P"/var/tmp/chunga-all-1.1.7.jar"
52     #<EQUAL HASH-TABLE 13 entries, 22 buckets {5368E7A9}>
53
54   
55The resulting jar contains the source required to run the ASDF system
56including any transitive ASDF dependencies.  Each such system is
57packaged under its own top level directory within the jar archive.
58
59To load the system from the jar one needs to add the ASDF file
60locations to the ASDF source registry, conveniently abstracted as the
61ASDF-JAR:ADD-TO-JAR function:
62
63    CL-USER> (asdf-jar:add-to-asdf "/var/tmp/chunga-all-1.1.7.jar)
64
65a subsequent
66
67    CL-USER> (asdf:load-system :chunga)
68
69should load the ASDF system from the jar.
70
71Setting CL:*LOAD-VERBOSE* will allow one to verify that the subsequent
72load is indeed coming from the jar.
73
74# Colophon
75
76     Mark Evenson
77     Created: 20-JUN-2011
78     Revised: 01-APR-2023
79     
80     
Note: See TracBrowser for help on using the repository browser.