HomeWildfire Games

Improve js glue code in D1839/rP22909 (hotkey state fix) and deal with rebase…
AuditedrP22963

Description

Improve js glue code in D1839/rP22909 (hotkey state fix) and deal with rebase leftovers.

The code could be improved by using more modern code.

Reviewed By: elexis

Differential Revision: https://code.wildfiregames.com/D2295

Event Timeline

Silier raised a concern with this commit.Sep 22 2019, 10:09 AM
Silier added a subscriber: Silier.

ERROR: CCacheLoader failed to find archived or source file for: "gui/hotkey.xml"

This commit now has outstanding concerns.Sep 22 2019, 10:09 AM
elexis added a subscriber: elexis.Sep 22 2019, 11:48 AM
Running cxxtest tests (326 tests)...........................ERROR: CCacheLoader failed to find archived or source file for: "gui/hotkey.xml"
WARNING: JavaScript warning: Script value conversion check failed: v.isBoolean() (got type undefined)

In TestGuiManager::test_hotkeysState:
/path/to/trunk/source/gui/tests/test_GuiManager.h:96: Error: Expected (hotkey_pressed_value == true), found (false != true)
WARNING: JavaScript warning: Script value conversion check failed: v.isBoolean() (got type undefined)
/path/to/trunk/source/gui/tests/test_GuiManager.h:101: Error: Expected (hotkey_pressed_value == true), found (false != true)
WARNING: JavaScript warning: Script value conversion check failed: v.isBoolean() (got type undefined)
WARNING: JavaScript warning: Script value conversion check failed: v.isBoolean() (got type undefined)
Index: binaries/data/mods/_test.gui/gui/hotkey/hotkey.xml
===================================================================
--- binaries/data/mods/_test.gui/gui/hotkey/hotkey.xml	(revision 22964)
+++ binaries/data/mods/_test.gui/gui/hotkey/hotkey.xml	(working copy)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <objects>
-	<script file="gui/hotkey.js"/>
+	<script file="gui/hotkey/hotkey.js"/>
 </objects>
Index: binaries/data/mods/_test.gui/gui/hotkey/page_hotkey.xml
===================================================================
--- binaries/data/mods/_test.gui/gui/hotkey/page_hotkey.xml	(revision 22964)
+++ binaries/data/mods/_test.gui/gui/hotkey/page_hotkey.xml	(working copy)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <page>
-	<include>hotkey.xml</include>
+	<include>hotkey/hotkey.xml</include>
 </page>

(Perhaps it would be good to test before committing)

Erh, I did that change and tested it locally... I went wrong somewhere but not sure how.

Further D2295 compiled with the broken change, so ????

Erh, I did that change and tested it locally... I went wrong somewhere but not sure how.

Further D2295 compiled with the broken change, so ????

The version I accepted worked but didn't move the folder, I assumed that could be done without another review.

In rP22963#38157, @Angen wrote:

Jenkins was correct, the last revision uploaded was correct, the committed one didnt commit all files it seems.

Jenkins was correct, the last revision uploaded was correct, the committed one didnt commit all files it seems.

The reason for the commit mess-up:
Because svn patch doesn't properly svn mv the files, I reverted the changes and called svn mv manually, but then I forgot to also apply the changes, thus the commit went wrong.

All concerns with this commit have now been addressed.Sep 22 2019, 12:19 PM