This is probably way less common with 20sec warpgate increase now...
Yea cannon works, but I kind of have an issue with spending 300+ on static defense that early. So they just dont attack and make probes+2nd gas, and its a more or less typical game. Also have to be careful about buildings being in cannon range.
I've tried simply laying down 2x gate asap when they take off gas and boost units, but this only gives your roughly equal unit numbers, so it mainly seems to come down to micro. Usually it seems you can only kill 3 out of the 4pylons. I have not tested this enough, but it looks like it can work well enough.
Stuff like adelscott and getting 2fast gate with core yourself should obviously work.
Proxy 2gate beats this easy if they dont scout.
2gate forces them to adapt.
walling off so they cant get in your base works, but is typically bad idea in the matchup.