I've had locks where the mainspring interfered with the angled flat on the barrel. I was able to grind a little fact on the top leaf of the spring to get it to nest properly against the barrel. I have seen barrels that had a a mortise cut in them to accept the spring. This is OK to do if the barrel has plenty of wall thickness.
Mostly one has this problem when using a lock that is too small for the barrel. I really don't have a rule of thumb that I use for this.
Before you start laying out, or making a drawing of you gun, place the lock on the barrel in the orientation you desire. If the spring hits the barrel, you will know you have to bevel the spring a little, or get a bigger lock.