subtypep strongly disagrees with class inheritance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
something has changed in SBCL in the last few months, maybe a couple of years regarding subtypep and class inheritance.
the symptom:
subtypep now returns (nil t) to something for which it used to return (t t). this breaks the lisp-type -> sql-type mapping in hu.dwim.perec.
with some effort i can probably create a standalone build script that uses only SBCL and quicklisp to reproduce the issue. let me know if the current amount of information is not enough to quickly pinpoint the issue, and i'll try to create that script.
this bug is exhibited by the perec test suite. to load the perec test suite:
(asdf:load-system :hu.dwim.
(in-package :hu.dwim.
and then this transcript happens:
TEST> (lisp-implement
"2.0.6"
TEST> (subtypep 'CHANGE-
0: (SB-KERNEL:
0: SB-KERNEL:
NIL
T
TEST> (let ((type1 (sb-c::
(type2 (sb-c::
0: (SB-KERNEL:
0: SB-KERNEL:
NIL
T
TEST> (sb-c::
#<HASH-TABLE :TEST EQ :HASH-FUNCTION #<FUNCTION SB-KERNEL:
TEST> (gethash (sb-c::
NIL
NIL
TEST> (class-
(#<PERSISTENT-CLASS HU.DWIM.
TEST>
we have compared the behavior with an older, working SBCL, and there the classoid-subclasses hashtable has more entries.
the old one that was used as comparison is an ancient version, "1.1.11.
the perec code has non-trivial MOP'ery, which may be relevant. it's possible that it's due to perec doing something illegal. there are metaclasses involved, classes and instances created programmatically, supertypes mixed in automatically, etc.
a wild guess: maybe the recent hash-table changes broke this setup?
description: | updated |
description: | updated |
description: | updated |
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
thank you for the quick fix Stas!
it's working again.