What do you mean won't upgrade ? After chivalrY you cannot upgrade the spear to a pike ? Works for me. I'm not sure why you wouldn't. Civs with a spear UU get their UU with warrior code. Have you tested it ? Since the free unit is by classes and not types it should work.