sbcl.sbcl/tests/pkgiter.impure.lisp
Douglas Katzman 132d1c042a
Some checks failed
Linux qemu / ppc64le (push) Failing after 0s
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Improve package iteration per lp#2080387
Allow changing accessibility from :INTERNAL to :EXTERNAL during iteration
without messing up the iterator. But now we have a duplicates problem which
it's unclear whether runs slightly afoul of the spec. e.g. DO-ALL-SYMBOLS
"may cause a symbol that is present in several packages to be processed more
than once". Since that's not phrased as if-and-only-if, we take the liberty
of returning a symbol more than once even when NOT present in more than
one package. Apparently so do some other Common-Lisp implementations.
2024-09-12 12:22:52 -04:00

13 lines
405 B
Common Lisp

;; lp# 2080387 but using the code of CSR, not the UB case
(make-package :som :use nil)
(setf *package* (find-package :som))
(cl:defparameter *mmm* cl:nil)
(cl:do-symbols (sym (cl:find-package :som))
(cl:push sym *mmm*)
(cl:export sym))
(cl:assert (cl:find '*mmm* *mmm*))
(cl:assert (cl:find 'sym *mmm*))
(cl:assert (cl:eq (cl:nth-value 1 (cl:find-symbol "*MMM*" "SOM"))
:external))