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
[2.0.72] [Modding] Inconsistent environment setup during migrations when mod/control.lua is missing
Re: [2.0.72] [Modding] Inconsistent environment setup during migrations when mod/control.lua is missing
Thanks for the report however this is working correctly. When a mod has a control.lua, the mods migration scripts run in that lua context. When the mod has no control.lua, the migration scripts run in a temporary lua context not owned by any specific mod.
If you want to get ahold of me I'm almost always on Discord.
- BraveCaperCat
- Filter Inserter

- Posts: 471
- Joined: Mon Jan 15, 2024 10:10 pm
- Contact:
Re: [2.0.72] [Modding] Inconsistent environment setup during migrations when mod/control.lua is missing
Ok, but that has any bearing on this issue... how?Rseding91 wrote: Tue Nov 04, 2025 12:14 pm Thanks for the report however this is working correctly. When a mod has a control.lua, the mods migration scripts run in that lua context. When the mod has no control.lua, the migration scripts run in a temporary lua context not owned by any specific mod.
The issue was not about lua contexts, it was about remote.interfaces being completely empty in migration scripts when the control.lua file is missing, but (potentially) not empty in migration scripts when the control.lua file is not missing.
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.

