summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-07-20 16:28:31 (GMT)
committerThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-07-26 08:35:20 (GMT)
commitbc58d59636f28909d90464cea7ebf5eeb8f230be (patch)
tree67c77e5f10f15eb2ec6202591ed20e24cb1d9ede /Swift/SConscript
parent810d77181de6408d54fd3a07964317d4866c732d (diff)
downloadswift-bc58d59636f28909d90464cea7ebf5eeb8f230be.zip
swift-bc58d59636f28909d90464cea7ebf5eeb8f230be.tar.bz2
Workaround Boost bug to prevent crash in recents loading
Boost 1.64 introduced a regression where boost::optional deserialisation could lead to a crash when loading the recent chats. This fix updates the way we serialise the ChatListWindow::Chat and HighlightAction classes to avoid these errors. A flag has been added, to allow the use of the erroneous version of the library during the build. During runtime if needed, the client will skip loading the data, to avoid any unpredicted behaviour. Test-Information: Tested on windows 10 with different versions of boost 1.56(bundled), 1.63, 1.64, 1.65 and Ubuntu 17.04 with versions 1.56(bundled) and 1.64. Added unit tests for the serialisation ChatListWindow::Chat class. Change-Id: Idc5c3a6cfd92272b8eab2d77e243dda743803a31
Diffstat (limited to 'Swift/SConscript')
-rw-r--r--Swift/SConscript6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/SConscript b/Swift/SConscript
index daff755..863597a 100644
--- a/Swift/SConscript
+++ b/Swift/SConscript
@@ -13,5 +13,9 @@ if env["SCONS_STAGE"] == "build" :
try :
SConscript("QtUI/SConscript")
except Exception as e:
- print "Warning: %s" % str(e)
+ print "Warning: %s" % str(e)
env["PROJECTS"].remove("Swift")
+if "Swift" in env["PROJECTS"] and env["BOOST_1_64_DETECTED"] and not env.get("allow_boost_1_64") and not env.GetOption("clean") :
+ #Version 1.64 has some issues with the serialization of boost::optional, see https://svn.boost.org/trac10/ticket/13050
+ print "Boost 1.64 has been detected. It is not recommended to use this version due to a regression within the library. Swift has been removed from the current build. You can still use this version by setting allow_boost_1_64 to true, but recent chats and highlighting rules will reset."
+ env["PROJECTS"].remove("Swift")