From: David Young

Subject: CLOS and packages

Date: 1997-11-14 13:50

Greetings. I'm new to CLOS, but have a distant background in Flavors
and Symbolics Common Lisp.

For platform particulars, I'm running Allegro CL 4.3 on Solaris 2.5.1.

In preparation for porting a large Java application, I've built a CLOS
threading package ('thread') that abstracts the Allegro CL Process
implementation. Naturally, this package contains generic functions
intended to be specialized by classes within other packages.

For testing purposes, I've also constructed a package 'server'
containing classes that utilize package 'thread'.

While exercising the thread code I encountered a generic dispatch
error. Specifically, CLOS generates

  Error: No methods applicable for generic function #<STANDARD-GENERIC-FUNCTION THREAD::RUN> with args
         (#<SIMPLE-SERVER::SIMPLE-SERVER @ #x36dba2>) of classes (SIMPLE-SERVER::SIMPLE-SERVER)
    [condition type: PROGRAM-ERROR]

when attempting to invoke, from the thread package, a method defined
in package 'server'. If I install both packages into
'COMMON-LISP-USER' (i.e. remove the 'defpackage' forms) everything
works just fine.

I've established the packages as follows:

Package 'thread':

(defpackage :thread
  (:export #:make-thread #:make-targeted-thread #:start #:thread-test
           #:runnable)
  (:use :lisp :excl :user :mp))

(in-package :thread)

...

Package 'server':

(defpackage :simple-server
  (:nicknames :ss)
  (:export #:run-server)
  (:use :socket :lisp :excl :user :thread))

(in-package :simple-server)

...

As I'm currently performing a time-constrained evaluation of Allegro
CL, I could use some assistance. Thanks much.

Regards,

-- 

-------------------------------------------------------------
David E. Young
Fujitsu Network Communications  "I claim not to have controlled
<fujitsu-fnc.com) at (d_young>        events, but confess plainly
                                 that events have controlled me."
                                  -- Abraham Lincoln (1864)
"Apology is Policy"