I'm facing an "interesting" bug in ECL: in my branch of cffi at https://github.com/fare/cffi I try to define a static-image-op that has gather-operation 'compile-op and gather-type :object because I want to force all objects to be linked, and using the same 'lib-op and :static-library as image-op cause objects unreferenced by ECL to be dropped. However, though I override these slots in my defclass, they don't seem effective.
(require "asdf") (asdf:load-system :cffi-toolchain)
(in-package :cffi-toolchain) (uiop-debug)
(defclass foo-op (image-op) ((gather-type :initform :object :allocation :class)))
(defun g (o) (asdf/bundle::gather-type (make-operation o)))
(DBG :foo (g 'image-op) ;==> :static-library, as expected (g 'static-image-op) ;==> :static-library, but expected :object (g 'static-program-op) ;==> :static-library, but expected :object (g 'foo-op)) ;==> :static-library, but expected :object
I tried to extract a smaller test case by recreating in a file the hierarchy of static-image-op, keeping only the definitions and overrides for slot gather-type, but then it worked. Maybe the combination of eval-when's and/or the compilation and loading play a role in making the bug happen.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org The only way for a reporter to look at a politician is down. — H.L. Mencken