freenode/#sbcl - IRC Chatlog
Search
11:22:07
flip214
stassats: I've got a case where after redefining a struct a defmethod call works for the first time afterwards, but not for the second or later calls.
11:22:35
flip214
would you like to take a look, or is your answer simply "redefining a structure is unsupported" as per the standard?
11:23:59
flip214
https://github.com/phmarek/sbcl/tree/no-applicable-method, the no-applicable-method/ directory - logfile included. just in case you're interested, and I'm already gone; thank you very much for any idea!
11:36:40
flip214
yeah, of course. but the DEFMETHOD might (or should?) have rebuilt the GF, I believe.
11:40:35
|3b|
possibly it changes what's in a cache and once it breaks it doesn't change anymore or something
14:56:57
dougk_
flip214: there is no SBCL bug involving structure redefinition. Expect nothing to work after adding a slot. And don't try to reason about what methods are attached to a GF that had the old definition until you understand all of the PCL implementation and everything in src/code/*class*.lisp
15:20:02
stassats
i love removing code, so the first option is closer to me, but it might slow down compilation
15:25:21
dougk_
i would do nothing. why does anyone want to claim that "correctly" dealing with structure definition is an issue? It's disallowed and we make only a best effort to support it at all
15:33:27
dougk_
refraining from at-runtime compilation is very important until we remove the world lock from compilation
15:33:42
dougk_
otherwise it would essentially single-thread anything that needs to compute a discriminating fun