From: Vladimir Zolotykh
Subject: REQUIRE: HOW TO USE IT ?
Date: 
Message-ID: <3D089A38.53337BFF@eurocom.od.ua>
Let me consider two files:
--------------------------------------------------------
File: a.cl

(defpackage :foo
  (:use :cl #+cmucl :ext #+allegro :excl)
  (:export #:bar))
(in-package :foo)
(defun bar () 'bar)
-----------------------------------------------------------
file b.cl

(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "/home/vlz/studies/require/a")
)
(defun bar ()
  (foo:bar))

-----------------------------------------------------------

Both files were compiled in ACL and CMUCL18c

Making 

  (require "/home/vlz/studies/require/b")

gives me the following error in CMUCL-18c

  Error in function COMMON-LISP::FOP-PACKAGE:  The package "FOO" does not exist.

In ACL file B loaded without any errors (package :foo was
properly established in time). I'm not sure about such REQUIRE usage.
Is it wrong or just not recommended ? I'm rather puzzled with error
in CMUCL. For example, if I comment foo:bar in B.CL file and insert
(print (find-package :foo)) after REQUIRE all works. PRINT indicate
found package :foo.

-- 
Vladimir Zolotykh
From: Raymond Toy
Subject: Re: REQUIRE: HOW TO USE IT ?
Date: 
Message-ID: <4nznxzgpg2.fsf@edgedsp4.rtp.ericsson.se>
>>>>> "Vladimir" == Vladimir Zolotykh <······@eurocom.od.ua> writes:

    Vladimir> Let me consider two files:
    Vladimir> --------------------------------------------------------
    Vladimir> File: a.cl

    Vladimir> (defpackage :foo
    Vladimir>   (:use :cl #+cmucl :ext #+allegro :excl)
    Vladimir>   (:export #:bar))
    Vladimir> (in-package :foo)
    Vladimir> (defun bar () 'bar)
    Vladimir> -----------------------------------------------------------
    Vladimir> file b.cl

    Vladimir> (in-package :cl-user)
    Vladimir> (eval-when (:compile-toplevel :load-toplevel :execute)
    Vladimir> (require "/home/vlz/studies/require/a")

REQUIRE takes a module-name and an optional file name, so this looks
wrong.


    Vladimir> Both files were compiled in ACL and CMUCL18c

    Vladimir> Making 

    Vladimir>   (require "/home/vlz/studies/require/b")

    Vladimir> gives me the following error in CMUCL-18c

    Vladimir>   Error in function COMMON-LISP::FOP-PACKAGE:  The package "FOO" does not exist.

If I make the correction above, this works ok on 18d.  Upgrade?

Ray