Core: Fix missing includes in type_info.h#111561
Conversation
4a7dc56 to
0ef0ee2
Compare
|
File include analysis:
|
Ivorforce
left a comment
There was a problem hiding this comment.
The type_info.h change makes sense to me, those includes missing is a compile problem waiting to happen.
Regarding the variant_ files, it seems that the headers are only included from the source files. So while it normally makes sense to remove includes from headers, in this case I don't think it will have an effect since the headers only affect the corresponding .cpp file.
So although we definitely want to address the class_db.h include problem somehow, I don't think these changes will bring us closer to this goal.
|
I agree that these changes will likely have minimal (if any) performance benefits. The justification of "delineating from Let me know if you would like me to split the PR into one that focuses solely on |
I think we should merge the |
0ef0ee2 to
c17e765
Compare
type_info.h
|
Changes to |
There was a problem hiding this comment.
I've confirmed that both includes are required in the file, and that this fixes compilation of a .cpp file that only includes type_info.h.
Thanks for adjusting with the feedback!
PS. I still hope that in the future, we could have a CI check that catches this type of problem early.
|
So do I... Hopefully the daily runner proposal gets approved and that gets included in there. |
|
Thanks! |
Added includes for
variant.handobject.htotype_info.h.These were missing but due to
type_info.halways being included afterclass_db.hwherever it was included, theVariantandObjectclasses would be defined and would let it compile.This made removing
class_db.hin many places impossible as it would breaktype_info.h.Old version of the PR
Reworks the include chains in core/variant.Changes:
variant.handobject.htotype_info.h. These were missing but due totype_info.halways being included afterclass_db.hwherever it was included, theVariantandObjectclasses would be defined and would let it compile. This made removingclass_db.hin many places impossible as it would breaktype_info.htype_info.hgoes from 4 to 70class_db.hwas removed fromvariant_construct.h,variant_destruct.h,variant_op.h,variant_setget.h, anddictionary.h.core/variantbeing theoretically completely decoupled fromclass_db.h*.hto*.cppas they are only needed there in those cases.variant_construct.hwas very bloated in terms of includes, this has been fixedMy machine is too slow and unpredictable to measure compile-time difference between this and master, so I can't provide those stats.