I’ve noticed that even between forms in the same package, the number of dots needed can vary. I’ve gotten out of the habit of copying and pasting those imports between forms and always let the autocomplete find them now.
You’re right it should be from .. import Globals. The Globals example app was created a long time ago and was running legacy code. I’ve updated the app so anyone cloning it now gets the correct code.
You’re also right that the best way to avoid issues like this in your own app is to use autocomplete.
Quick edit:
The legacy code existed in the Global example app because the app was created before we introduced packages. If anyone is interested in reading more, we have a how-to guide which explains the difference and how to convert any legacy Anvil apps to use packages.