Skip to content

Fix crash after "Failed to recognize type" - #27

Open
slburson wants to merge 2 commits into
borodust:masterfrom
slburson:failed-to-recognize-type
Open

Fix crash after "Failed to recognize type"#27
slburson wants to merge 2 commits into
borodust:masterfrom
slburson:failed-to-recognize-type

Conversation

@slburson

@slburson slburson commented Jul 1, 2026

Copy link
Copy Markdown

At one point, as I was adjusting the inclusions and exclusions for Claw-Torch, I got four instances of this message:

   Failed to recognize type of RECORD kind from UNIQUE category: std::basic_string<char, std::char_traits<char>, std::allocator<char>>

followed by a no-such-method error on claw.spec::foreign-entity-id. I don't know why I got the "failed to recognize type" message, but I wanted to get output anyway, so I added a quick hack to allow the process to proceed.

Scott L. Burson added 2 commits May 20, 2026 15:41
The three 'parse-type' methods I deleted cannot be called; 'kind' is a
type kind, i.e. ':record', not a declaration kind.
Comment thread src/gen/common/util.lisp
(:function-prototype-pointer (let ((overriden (%overtype :function-prototype-pointer)))
(if (eq overriden :function-prototype-pointer)
(%overtype :void)
(%overtype :pointer)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this; I based this PR on the wrong commit.

Comment thread src/resect/resect.lisp
Comment on lines -851 to -864
(defmethod parse-type (category (kind (eql :struct)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))


(defmethod parse-type (category (kind (eql :union)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))


(defmethod parse-type (category (kind (eql :class)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods can't be called — kind here is a type-kind, not a declaration kind, so it can't have these values, only :record — and I found their presence very confusing at first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant