[2.0.72] [Modding] Inconsistent environment setup during migrations when mod/control.lua is missing
Posted: Tue Nov 04, 2025 8:21 am
Context
I had to come up with a way to migrate data in my primarily-scenario mod and it came to exfiltrating data through remote interface into the mod, which performs data migrations and then sends it back. Which is possible, thanks to some discipline (no metatables in storage) and hacks (handling invalid LuaObjects).
But after doing some clean up (It turned out I didn't need control.lua), all remote interfaces became unavailable in the migration script in the migrations directory.
What did you do?
I've removed control.lua from my mod
What happened?
remote.interfaces returns {} during migration
What did you expect to happen instead? It might be obvious to you, but do it anyway!
remote.interfaces should return all registered interfaces during migration
Does it happen always, once, or sometimes?
Always
I had to come up with a way to migrate data in my primarily-scenario mod and it came to exfiltrating data through remote interface into the mod, which performs data migrations and then sends it back. Which is possible, thanks to some discipline (no metatables in storage) and hacks (handling invalid LuaObjects).
But after doing some clean up (It turned out I didn't need control.lua), all remote interfaces became unavailable in the migration script in the migrations directory.
What did you do?
I've removed control.lua from my mod
What happened?
remote.interfaces returns {} during migration
What did you expect to happen instead? It might be obvious to you, but do it anyway!
remote.interfaces should return all registered interfaces during migration
Does it happen always, once, or sometimes?
Always