How to include all function and package declarations in a file called all.lisp for asd-package-inferred-system

So, in the asdf manual / documentation in section 6.5 of the package-in-the-system extension, this example uses the all.lisp file to define the packages (which we will assume will contain all the function and package information for that corresponding subdialom).

I want to know what the "correct" way would be to include all function and package declarations in this all.lisp file. Can I do something like include all function declarations for that subdirectory in all.lisp and then use the register-system-packages function in asdf. Or I can omit the all.lisp file and let the compiler infer the packages from the files (but I will need to use the register-system-packages function for every single file I add to this system).

I'm just curious about the specifics of using this system and the files and declarations that need to be made when adding a new file to the system.

Sorry for the opacity of the question; I cannot understand the specifics of this system

+3


source to share


2 answers


1- See how it is done in lisp-interface-library/*/all.lisp

using uiop:define-package

and his suggestion :use-reexport

.

See for example pure/all.lisp

:

(uiop:define-package :lil/pure/all (:nicknames :pure) (:import-from :lil/interface/all) (:use :closer-common-lisp) (:mix :fare-utils :uiop :alexandria) (:use-reexport :lil/interface/base :lil/interface/eq :lil/interface/order :lil/interface/group :lil/pure/empty :lil/pure/collection :lil/pure/iterator :lil/pure/map :lil/pure/set :lil/pure/alist :lil/pure/tree :lil/pure/hash-table :lil/pure/fmim :lil/pure/encoded-key-map :lil/pure/queue :lil/pure/iterator-implementation :lil/pure/map-implementation :lil/pure/set-implementation :lil/pure/alist-implementation :lil/pure/tree-implementation :lil/pure/hash-table-implementation :lil/pure/fmim-implementation :lil/pure/encoded-key-map-implementation :lil/pure/queue-implementation ))

2- These days I recommend using the asdf 3.1 requirement and not using the asdf-package-system. For maximum backward incompatibility use



#-asdf3.1 (error "<my system> requires ASDF 3.1 or later. Please upgrade your ASDF.")

And then in defsystem

,:class :package-inferred-system

3- I am not following this forum very closely. ASDF questions are answered faster on the mailing list asdf-devel

.

+1


source


As I understand it, you just have to have a package defined in all.lisp

, depending on packages defined in other files on that system. This is, in a way, the entry point for the dependency graph into this system. I would expect it all.lisp

to contain high level record definitions that naturally depend on other files.



For example, if you are building a system that has a (sub) system to display the web interface, the file / package webinterface/all.lisp

will contain functions for configuring, starting and stopping the web server. These functions will depend on handler definitions in other files / packages, which in turn will depend on other files / packages that provide data or handle request processing.

0


source







All Articles