Page 1 of 2

removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 01:38
by jK
Engine devs agreed that there aren't 'unsafe' changes and if there are than they are engine bugs.
So I would like to remove that function in the next Spring RC.
Opinion by modders welcome, if this is too short dated and you already fixed your mods with current git.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 01:54
by FLOZi
Bin it. 8)

This RC would be preferable as mods are already forced to update for it (modinfo.tdf and startUnit changes).

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 08:09
by Google_Frog
I agree. Errors from unsafe changes are engine bugs so there is no point calling them unsafe changes.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 15:33
by TheFatController
jK wrote:Engine devs agreed that there aren't 'unsafe' changes and if there are than they are engine bugs.
So I would like to remove that function in the next Spring RC.
Opinion by modders welcome, if this is too short dated and you already fixed your mods with current git.
This is not clear, do you mean that AllowUnsafeChanges("USE AT YOUR OWN PERIL") will always be on or do you mean that you want to remove the ability to give orders outside of gameframe and so on?

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 15:41
by FLOZi
He means it will always be on. No loss of functionality, just dispensing with the chore of flipping the switch.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 15 Jul 2010, 15:43
by jK
`Unsafe` changes will be always allowed and the AllowUnsafeChanges() function will get removed (any tries to call it will give an error).

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 19 Jul 2010, 15:22
by FLOZi
What's the word on this?

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 19 Jul 2010, 22:23
by jK
Done here.

So it isn't the current test-build, but will be in the RC.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 25 Jul 2010, 23:56
by BrainDamage
since this is a quite important change, mod-breaking even, may I suggest creating another sticky in the mod section like for the other compatibility-breaking changes?

also, given the short notice ( other changes had 6 months+ warning, and were delayed by 1 major release too ) I think it would be better than instead of removing the function completely, to add an empty stub in the engine that prints a deprecation warning, and remove the stub in the next major release.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 26 Jul 2010, 00:36
by lurker
Then again, if it's at the same time as removing modinfo.tdf support..

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 26 Jul 2010, 01:08
by BrainDamage
the 2 proposals are distinct, while you can bring the "break all at once" argument for the second point, there's no reason not to advertise the change properly like the others were

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 26 Jul 2010, 03:00
by FLOZi

Code: Select all

if AllowUnsafeChanges then AllowUnsafeChanges("USE AT YOUR OWN PERIL") end
-->Great success.

Indeed it should be advertised though.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 27 Jul 2010, 08:12
by KDR_11k
BrainDamage wrote:also, given the short notice ( other changes had 6 months+ warning, and were delayed by 1 major release too ) I think it would be better than instead of removing the function completely, to add an empty stub in the engine that prints a deprecation warning, and remove the stub in the next major release.
I agree with that, deprecation warnings given out by the engine are probably the best way to communicate with the developer. No need to break things more than necessary.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 27 Jul 2010, 19:36
by Tobi
announcementified

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 27 Apr 2011, 22:47
by Regret
Is this announcement still relevant? It's been almost a year since the change.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 27 Apr 2011, 23:07
by zwzsg
Apparently, yes:
azert123 wrote:

Code: Select all

[f=0000000] Loading LuaRules
[f=0000000] Lua LoadCode pcall error = 2, LuaRules/main.lua, [string "LuaRules/main.lua"]:1: attempt to call global 'AllowUnsafeChanges' (a nil value)

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 28 Apr 2011, 12:47
by Regret
zwzsg wrote:Apparently, yes:
azert123 wrote:

Code: Select all

[f=0000000] Loading LuaRules
[f=0000000] Lua LoadCode pcall error = 2, LuaRules/main.lua, [string "LuaRules/main.lua"]:1: attempt to call global 'AllowUnsafeChanges' (a nil value)
That's an outdated game without a maintainer/developer.

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 28 Apr 2011, 12:55
by FLOZi

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 26 May 2011, 19:51
by knorke
moving to archive.
I think the place where most people got in contact with AllowUnsafeChanges was the old game_spawn.lua but now it has been updated since a while:
https://github.com/spring/spring/blob/m ... _spawn.lua

Re: removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")

Posted: 13 Apr 2015, 14:11
by 8611
this was five years ago.
if still want to document then do it on https://springrts.com/wiki/EngineChange ... ontentDevs or add AllowUnsafeChanges() to Lua wiki and mark it as deprecated.