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 » 15 Jul 2010, 01:38

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.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi » 15 Jul 2010, 01:54

Bin it. 8)

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

Google_Frog
Moderator
Posts: 2436
Joined: 12 Oct 2007, 09:24

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

Post by Google_Frog » 15 Jul 2010, 08:09

I agree. Errors from unsafe changes are engine bugs so there is no point calling them unsafe changes.
0 x

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 » 15 Jul 2010, 15:33

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?
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi » 15 Jul 2010, 15:41

He means it will always be on. No loss of functionality, just dispensing with the chore of flipping the switch.
0 x

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 » 15 Jul 2010, 15:43

`Unsafe` changes will be always allowed and the AllowUnsafeChanges() function will get removed (any tries to call it will give an error).
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi » 19 Jul 2010, 15:22

What's the word on this?
0 x

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 » 19 Jul 2010, 22:23

Done here.

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

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 » 25 Jul 2010, 23:56

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.
0 x

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker » 26 Jul 2010, 00:36

Then again, if it's at the same time as removing modinfo.tdf support..
0 x

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 » 26 Jul 2010, 01:08

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
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi » 26 Jul 2010, 03:00

Code: Select all

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

Indeed it should be advertised though.
0 x

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 » 27 Jul 2010, 08:12

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.
0 x

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi » 27 Jul 2010, 19:36

announcementified
0 x

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

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

Post by Regret » 27 Apr 2011, 22:47

Is this announcement still relevant? It's been almost a year since the change.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7015
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg » 27 Apr 2011, 23:07

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)
0 x

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

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

Post by Regret » 28 Apr 2011, 12:47

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.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi » 28 Apr 2011, 12:55

0 x

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

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

Post by knorke » 26 May 2011, 19:51

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
0 x

8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

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

Post by 8611 » 13 Apr 2015, 14:11

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.
0 x

Locked

Return to “Game Development Tutorials & Resources”