Asterisk and Obelisk

I mentioned in the podcast that I was having some trouble upgrading mogenerator that I hadn’t investigated yet.

Specifically, I was using mogenerator 1.23, and had tried upgrading to a newer version, I believe 1.25. This led to some build errors, at which point I set it aside, until this week.

Mystery now solved! What happened was that the replacement text for the <$Attribute.objectAttributeType> template macro changed from not including the trailing asterisk of an Objective-C object pointer to including it. Due to the old behavior, my template files always added their own asterisk after that macro. So when I upgraded, every usage became a pointer-to-a-pointer. While you can use pointers-to-pointers in property declarations, you can’t give them the “retain” attribute, so clang complained.

Updating both mogenerator and my templates fixed the problem. The trouble is, if I want to build an older version of my code, I’ll have to downgrade mogenerator again or make a one-time branch off the old commit with the template updates. So I hope mogenerator doesn’t need to make a change like this again.

%d bloggers like this: