[asdf-devel] Changes to ASDF for LW6

David McClain dbm at refined-audiometrics.com
Fri Feb 26 17:30:00 UTC 2010


Hi Thanks for your suggestions, I'll give them a try. 

Right now the way it is being loaded is as follows:

;; loads (and compiles, if needed) ASDF unless it's already in the
;; image
#-:asdf
(progn
  #+(OR :SBCL :CLOZURE)
  (require "asdf")
  #-(OR :SBCL :CLOZURE)
  (handler-case
      (when *asdf-pathname*
	(load
	 #+:LISPWORKS
	 (or (compile-file-if-needed *asdf-pathname*)
	     *asdf-pathname*)
	 #+:SBCL
	 *asdf-pathname*))
    (#+:LISPWORKS conditions:fasl-error
      #+:SBCL sb-ext:invalid-fasl
      ()
      (load (compile-file *asdf-pathname*)))))


This is running while the current package is set to :CL-USER. I tried changing the USE-PACKAGE in this section, and in the main ASDF.LISP to be :COMMON-LISP instead of :CL-USER, but the error message persists.

So it seems that COMPILE-FILE-IF-NEEDED is setting us back to CL-USER. 

- DM

On Feb 26, 2010, at 10:20 AM, Chun Tian (binghe) wrote:

> Hello, David
> 
> First, what you're talking here is not LispWorks 6.0 specific, but happens in all LispWorks versions.
> 
> Second, you're using ASDF in a wrong way. I assume your final goal is to automatically load some ASDF-based CL packages when LispWorks starts up. This can be done by putting forms as below into your ".lispworks" file:
> 
>  (compile-file "asdf.lisp" :load t) ; or just (load "asdf") if you have already compile it into fasl.
>  (pushnew ... asdf:*central-registry*)
>  (asdf:oos 'asdf:load-op :xxx)
> 
> What you changed in asdf.lisp will cause a few symbols not being exported any more. Wrong.
> 
> 
> Regards,
> 
> Chun Tian (binghe)
> 
> 在 2010-2-26,23:00, David McClain 写道:
> 
>> No, I take a stock LW6 system and want to load up the ASDF package as soon as possible, so that I can then use ASDF to load in systems. When I take a look at the PACKAGE-USE-LIST of CL-USER, it shows COMMON-LISP, HARLEQUIN-COMMON-LISP, and LISPWORKS.
>> 
>> Have a look at the very front of the asdf.lisp file --- it places itself into package :CL-USER. So we are screwed up from the get go. 
>> 
>> All I did was conditionalilze exports of two symbols that were already exported from another package and which performed identical functionality, and then I added a section to the rather elaborate package construction kit for ASDF to permit the declaration of some shadowed symbols. Simple. Effective. It works.
>> 
>> - DM
>> 
>> On Feb 26, 2010, at 07:31 AM, Faré wrote:
>> 
>>> I don't understand. Do you mean that there is a problem when you (load
>>> "asdf") itself, or are you trying to (use-package :asdf) from cl-user?
>>> The latter is probably a bad idea, and wasn't supported so far (so far
>>> I know).
>>> 
>>> [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
>>> Can anyone please squash this butterfly in Tokyo? I'm sick with its flapping
>>> wings changing the outcome of my life.
>>> 
>>> 
>>> 
>>> 
>>> 2010/2/26 David McClain <dbm at refined-audiometrics.com>:
>>>> ... rather, in package :CL-USER, not :LW-USER. But apparently, LISPWORKS is automatically being used in CL-USER...
>>>> 
>>>> - DM
>>>> 
>>>> On Feb 26, 2010, at 01:13 AM, Chun Tian (binghe) wrote:
>>>> 
>>>>> Hi, David
>>>>> 
>>>>> I don't think it's necessary to make ASDF and LISPWORKS two packages live together. What you met can only happen when you try to defined a package which use above two packages at the same time:
>>>>> 
>>>>> (defpackage xxx
>>>>> (:use :cl :asdf :lispworks))
>>>>> 
>>>>> I don't think you have any good reason to use such a package.
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Chun Tian (binghe)
>>>>> 
>>>>> 在 2010-2-26,15:44, David McClain 写道:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I just installed the latest available source for ASDF and had to make a few minor changes to the way the ASDF Package was being defined, for compatibility with Lispworks 6.0: (changes highlighted in red -- if you can see them)
>>>>>> 
>>>>>>       ...
>>>>>> 
>>>>>>         (ensure-shadow (package symbols)
>>>>>>           (shadow symbols package))
>>>>>> 
>>>>>>         (ensure-package (name &key nicknames use export unintern shadow)
>>>>>>           (let* ((p (ensure-exists name nicknames)))
>>>>>>             (ensure-use p use)
>>>>>>             (ensure-unintern p unintern)
>>>>>> 
>>>>>>             (ensure-shadow p shadow)
>>>>>> 
>>>>>>             (ensure-export p export)
>>>>>>             p)))
>>>>>>  (ensure-package
>>>>>>   ':asdf-utilities
>>>>>>   :nicknames '(#:asdf-extensions)
>>>>>>   :use '(#:common-lisp)
>>>>>>   :export
>>>>>>   '(#:absolute-pathname-p
>>>>>>     #:aif
>>>>>> 
>>>>>>     #-:LISPWORKS #:appendf
>>>>>> 
>>>>>>     #:asdf-message
>>>>>>     #:coerce-name
>>>>>>     #:directory-pathname-p
>>>>>>     #:ends-with
>>>>>>     #:ensure-directory-pathname
>>>>>> 
>>>>>>     #-:LISPWORKS #:getenv
>>>>>> 
>>>>>>     #:get-uid
>>>>>>     #:length=n-p
>>>>>>     #:make-collector
>>>>>>     #:pathname-directory-pathname
>>>>>>     #:pathname-sans-name+type ;; deprecated. Use pathname-directory-pathname
>>>>>>     #:read-file-forms
>>>>>>     #:remove-keys
>>>>>>     #:remove-keyword
>>>>>>     #:resolve-symlinks
>>>>>>     #:split
>>>>>>     #:component-name-to-pathname-components
>>>>>>     #:system-registered-p
>>>>>>     #:truenamize))
>>>>>>  (ensure-package
>>>>>>   ':asdf
>>>>>>   :use '(:common-lisp :asdf-utilities)
>>>>>>   :unintern '(#:*asdf-revision*)
>>>>>> 
>>>>>>   :shadow #+:LISPWORKS '(#:load-system
>>>>>>                          #:compile-system
>>>>>>                          #:defsystem)
>>>>>>   #-:LISPWORKS '()
>>>>>> 
>>>>>>   :export
>>>>>>   '(#:defsystem #:oos #:operate #:find-system #:run-shell-command
>>>>>>     #:system-definition-pathname #:find-component ; miscellaneous
>>>>>>     #:compile-system #:load-system #:test-system
>>>>>>     #:compile-op #:load-op #:load-source-op
>>> 
>> 
>> Dr. David McClain
>> dbm at refined-audiometrics.com
>> 
>> 
>> 
> 

Dr. David McClain
dbm at refined-audiometrics.com







More information about the asdf-devel mailing list