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

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

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

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

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

Bin it. 8)

This RC would be preferable as mods are already forced to update for it (modinfo.tdf and startUnit changes).
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

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

Post by Google_Frog »

I agree. Errors from unsafe changes are engine bugs so there is no point calling them unsafe changes.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

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

Post 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?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

He means it will always be on. No loss of functionality, just dispensing with the chore of flipping the switch.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

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

Post by jK »

`Unsafe` changes will be always allowed and the AllowUnsafeChanges() function will get removed (any tries to call it will give an error).
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

What's the word on this?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

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

Post by jK »

Done here.

So it isn't the current test-build, but will be in the RC.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

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

Post 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.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker »

Then again, if it's at the same time as removing modinfo.tdf support..
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

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

Post 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
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

Code: Select all

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

Indeed it should be advertised though.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post 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.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi »

announcementified
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

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

Post by Regret »

Is this announcement still relevant? It's been almost a year since the change.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

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

Post 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)
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

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

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

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

Post 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
8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

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

Post 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.
Locked

Return to “Game Development Tutorials & Resources”