Page MenuHomeWildfire Games

Remove deprecated SendGetGameList completely
ClosedPublic

Authored by elexis on Apr 28 2017, 1:52 PM.

Details

Summary

rP19285 / D207 removed the only call to SendGetGameList.
The call was unneeded and a server shouldn't support unneeded getters that can cause performance issues.
The clients receive the gamelist on join and on update, so it's their duty of caching the data.
Therefore we can and shall remove the response and the C++ part.

(If the response would ever be used by a client that doesn't implement simple caching, then we should implement authorization serverside when reintroducing the removed lines.)

Test Plan

The bot changes should be proofread by anyone who had setup the ejabberd server and XPartaMuPP.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1305
Build 2054: Vulcan BuildJenkins
Build 2053: arc lint + arc unit

Event Timeline

elexis created this revision.Apr 28 2017, 1:52 PM
Vulcan added a subscriber: Vulcan.Apr 28 2017, 2:05 PM

Build has FAILED

Updating workspaces.
Build (release)...
../../../source/lobby/scripting/JSInterface_Lobby.cpp: In function ‘void JSI_Lobby::RegisterScriptFunctions(ScriptInterface&)’:
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:42: error: ‘SendGetGameList’ is not a member of ‘JSI_Lobby’
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                          ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:18: error: parse error in template argument list
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                  ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: error: no matching function for call to ‘ScriptInterface::RegisterFunction(const char [16])’
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                                                                       ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: note: candidates are:
In file included from ../../../source/scriptinterface/ScriptInterface.h:408:0,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.h:22,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.cpp:20:
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note: template<class R, R (* fptr)(ScriptInterface::CxPrivate*)> void ScriptInterface::RegisterFunction(const char*)
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:52:36: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
                                    ^
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note:   template argument deduction/substitution failed:
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:52:36: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
                                    ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: error: template argument 2 is invalid
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptInterface.h:408:0,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.h:22,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.cpp:20:
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note: template<class R, class T0, R (* fptr)(ScriptInterface::CxPrivate*, typename ScriptInterface::MaybeRef<T0>::Type)> void ScriptInterface::RegisterFunction(const char*)
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:53:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d)
                                                              ^
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note:   template argument deduction/substitution failed:
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:53:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d)
                                                              ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: error: template argument 2 is invalid
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptInterface.h:408:0,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.h:22,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.cpp:20:
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note: template<class R, class T0, class T1, R (* fptr)(ScriptInterface::CxPrivate*, typename ScriptInterface::MaybeRef<T0>::Type, typename ScriptInterface::MaybeRef<T1>::Type)> void ScriptInterface::RegisterFunction(const char*)
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:54:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d)
                                                              ^
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note:   template argument deduction/substitution failed:
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:54:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d)
                                                              ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: error: template argument 2 is invalid
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptInterface.h:408:0,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.h:22,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.cpp:20:
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note: template<class R, class T0, class T1, class T2, R (* fptr)(ScriptInterface::CxPrivate*, typename ScriptInterface::MaybeRef<T0>::Type, typename ScriptInterface::MaybeRef<T1>::Type, typename ScriptInterface::MaybeRef<T2>::Type)> void ScriptInterface::RegisterFunction(const char*)
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:55:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d)
                                                              ^
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note:   template argument deduction/substitution failed:
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:55:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d)
                                                              ^
../../../source/lobby/scripting/JSInterface_Lobby.cpp:42:87: error: template argument 2 is invalid
  scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList");
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptInterface.h:408:0,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.h:22,
                 from ../../../source/lobby/scripting/JSInterface_Lobby.cpp:20:
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note: template<class R, class T0, class T1, class T2, class T3, R (* fptr)(ScriptInterface::CxPrivate*, typename ScriptInterface::MaybeRef<T0>::Type, typename ScriptInterface::MaybeRef<T1>::Type, typename ScriptInterface::MaybeRef<T2>::Type, typename ScriptInterface::MaybeRef<T3>::Type)> void ScriptInterface::RegisterFunction(const char*)
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:56:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d)
                                                              ^
../../../source/scriptinterface/NativeWrapperDecls.h:62:7: note:   template argument deduction/substitution failed:
  void RegisterFunction(const char* name) { \
       ^
/usr/include/boost/preprocessor/repetition/repeat.hpp:56:62: note: in expansion of macro ‘OVERLOADS’
 # define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d)

Link to build: http://jw:8080/job/phabricator/901/
See console output for more information: http://jw:8080/job/phabricator/901/console

elexis updated this revision to Diff 1513.Apr 28 2017, 6:42 PM

Forgot to nuke a line in JSInterface_Lobby.cpp after I had rewritten the patch the third time after losing it twice :X

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/908/ for more details.

scythetwirler accepted this revision.Apr 28 2017, 10:12 PM
This revision is now accepted and ready to land.Apr 28 2017, 10:12 PM
This revision was automatically updated to reflect the committed changes.