View topic - removal of AllowUnsafeChanges("USE AT YOUR OWN PERIL")



All times are UTC + 1 hour


Post new topic Reply to topic  [ 19 posts ] 
Author Message
PostPosted: 15 Jul 2010, 00:38 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
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.


Top
 Offline Profile  
 
PostPosted: 15 Jul 2010, 00:54 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Bin it. 8)

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


Top
 Offline Profile  
 
PostPosted: 15 Jul 2010, 07:09 
Moderator

Joined: 12 Oct 2007, 08:24
I agree. Errors from unsafe changes are engine bugs so there is no point calling them unsafe changes.


Top
 Offline Profile  
 
PostPosted: 15 Jul 2010, 14:33 
Balanced Annihilation Maintainer
User avatar

Joined: 10 Dec 2006, 18:46
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?


Top
 Offline Profile  
 
PostPosted: 15 Jul 2010, 14:41 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
He means it will always be on. No loss of functionality, just dispensing with the chore of flipping the switch.


Top
 Offline Profile  
 
PostPosted: 15 Jul 2010, 14:43 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
`Unsafe` changes will be always allowed and the AllowUnsafeChanges() function will get removed (any tries to call it will give an error).


Top
 Offline Profile  
 
PostPosted: 19 Jul 2010, 14:22 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
What's the word on this?


Top
 Offline Profile  
 
PostPosted: 19 Jul 2010, 21:23 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
Done here.

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


Top
 Offline Profile  
 
PostPosted: 25 Jul 2010, 22:56 
Lobby Developer
User avatar

Joined: 25 Sep 2006, 12: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.


Top
 Offline Profile  
 
PostPosted: 25 Jul 2010, 23:36 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
Then again, if it's at the same time as removing modinfo.tdf support..


Top
 Offline Profile  
 
PostPosted: 26 Jul 2010, 00:08 
Lobby Developer
User avatar

Joined: 25 Sep 2006, 12:56
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


Top
 Offline Profile  
 
PostPosted: 26 Jul 2010, 02:00 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Code:
if AllowUnsafeChanges then AllowUnsafeChanges("USE AT YOUR OWN PERIL") end


-->Great success.

Indeed it should be advertised though.


Top
 Offline Profile  
 
PostPosted: 27 Jul 2010, 07:12 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
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.


Top
 Offline Profile  
 
PostPosted: 27 Jul 2010, 18:36 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
announcementified


Top
 Offline Profile  
 
PostPosted: 27 Apr 2011, 21:47 

Joined: 18 Aug 2007, 18:04
Is this announcement still relevant? It's been almost a year since the change.


Top
 Offline Profile  
 
PostPosted: 27 Apr 2011, 22:07 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Apparently, yes:

azert123 wrote:
Code:
[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)


Top
 Offline Profile  
 
PostPosted: 28 Apr 2011, 11:47 

Joined: 18 Aug 2007, 18:04
zwzsg wrote:
Apparently, yes:

azert123 wrote:
Code:
[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.


Top
 Offline Profile  
 
PostPosted: 28 Apr 2011, 11:55 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
imo archive it to viewforum.php?f=67


Top
 Offline Profile  
 
PostPosted: 26 May 2011, 18:51 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.