On a recent flight from YYZ to Calgary, we observed Air Canada measuring carryon bags prior to going through security. It did not appear to be mandatory as we easily walked past without getting our bag measured. On our return flight, we were seated in the gate waiting area and we were approached by Air Canada staff; we were told the carryon bag 'must' be measured prior to boarding.
Later, the gate staff made an announcement that if anyone gate checked their carryon (for free) they could board in Zone 3 with the families. We took advantage of that offer because we were on our way home, not too sure if I would risk giving up my carryon at the beginning of my travels.