-
Hi, In the code for mito/src/core/class/column.lisp Line 73 in 9a2f926 (defmethod initialize-instance :around ((class table-column-class) &rest rest-initargs
&key name initargs ghost
&allow-other-keys)
(declare (ignore ghost))
(unless (find (symbol-name name) initargs :test #'string=)
;; Add the default initarg.
(push (intern (symbol-name name) :keyword)
(getf rest-initargs :initargs)))
(let ((class (apply #'call-next-method class rest-initargs)))
(unless (slot-boundp class 'col-type)
(if (or (ghost-slot-p class)
(slot-value class 'references))
(setf (slot-value class 'col-type) nil)
(error 'col-type-required
:slot class)))
class)) A check for (unless (slot-boundp class 'col-type)
(if (or (ghost-slot-p class)
(slot-value class 'references))
(setf (slot-value class 'col-type) nil)
(error 'col-type-required
:slot class))) This is causing issues for me with Here's the code for reference: (defmethod compute-effective-slot-definition ((class slot-class) name dslotds)
(let* ((initargs (compute-effective-slot-definition-initargs class dslotds))
(class (apply #'effective-slot-definition-class class initargs))
(slotd (apply #'make-instance class initargs)))
slotd)) Because before I can Why is the error signaled on initialize-instance? Could we change that to somewhere else like whenever generating the SQL where it may make more sense? When we generate the SQL we need I think this is more sensible and allows for the project to be extensible. What do you think? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
From here it looks like it's used in only 7 source files: https://github.com/search?q=repo%3Afukamachi%2Fmito%20col-type&type=code
Every single one that could be problematic calls mito/src/core/class/column.lisp Line 73 in 9a2f926 Therefore I think removing this error signaling should not actually affect the functionality of mito in any way, and it's safe to remove. What do you think? Do you agree? Would you accept a PR? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your suggestion. It totally sounds great to me! |
Beta Was this translation helpful? Give feedback.
Thank you for your suggestion. It totally sounds great to me!
The error was just because I thought it would make a meaningful message to users.