(defpackage :foo (:use :cl)) (in-package :foo)
(defvar *data* nil)
(defpackage :bar (:use :cl)) (in-package :bar)
(eval-when (:compile-toplevel) (import 'foo::*data*))
(setf *data* 99)
Compile this, restart ABCL, and load the fasl. foo::*data* is NIL and bar::*data* is 99.
It's possible the code is somehow nonconforming, however it sure seems that foo::*data* should be written and later loaded, which is the behavior of other Lisps.
The issue is also exhibited with
(compile-file "test.lisp") (delete-package :foo) (delete-package :bar) (load "test.abcl")
armedbear-devel@common-lisp.net