View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004817||The Dark Mod||TDM Updater||public||04.06.2018 03:47||04.03.2019 14:50|
|Product Version||TDM 2.06|
|Target Version||TDM 2.08||Fixed in Version||TDM 2.08|
|Summary||0004817: Remove boost (and libsvn) from tdm_update|
|Description||We have already removed boost from the game itself.|
Now it's time to get rid of it completely.
UPDATE: we decided to also remove libsubversion from packager. This is added to this task.
|Tags||No tags attached.|
Quote of the day (line breaks mine):
// get the number of PK4 files in the target directory
std::size_t totalFileOperations = std::count_if(
Things are moderately good thus far.
Not as good as with TDM: updater and packager contain tons of boost.
I am using the same conversion model as with TDM: I have copied StdString and StdFilesystem files to libtdm_update. Had to expand it significantly.
The worst offenders are:
1) boost::filesystem::(recursive_)directory_iterator. Had to replace it with (recursive_d)irectory_enumerate, just as in TDM.
2) boost::program_options. Had to reimplement options parsing. Luckily, updater and packager use only very basic subset (as usual).
3) boost::spirit. I copied IniParser from TDM, now rewriting two other (even simpler) parsers.
4) boost::format. There are 121 occurrences of this. I'm not yet sure how to convert it.
Replacing with C-like wrapper around snprintf needs manual inspection of all the cases and is too error-prone. Writing own implementation which would work only for a limited set of types sounds stupid.
I'm afraid I will resort to some third-party library like tinyformat for this.
P.S. We have three independent implementations of the same CRC32 in our repository. I will reduce that to two =)
I have decided to use tinyformat.
It replaces boost::format perfectly (after running a calls-replacing script).
The current state is: everything is already done, I'm testing all the stuff (package/update on Windows/Linux).
Hopefully, I will commit all the changes rather soon.
I have tested tdm_update both on Windows (update from 2.06 to 2.07) and on Linux (update from 2.05 to 2.07).
Also, I have tested packaged on Windows (all 7 commands) and on Linux (create-manifest and create-package).
Everything looks good.
The only weird things are:
1) Calling "svn list -R ." causes svn to ask credentials for darkmod SVN.
2) When updater tries to delete its own executable, the old build reports error to logfile:
Exception while removing file: boost::filesystem::remove: ...
The new build does not report this, just silently leaves the file intact.
I guess that unlike boost, std::filesystem does not consider "cannot remove" a hard error, instead it just returns false.
Finally committed all the changes in svn revs 7981-7998.
I decided to split commit in parts to make bisecting easier in case of any problems.
The boost and libsvn libraries are yet in the repo.
|Removed the libraries from the repo in svn rev 8017-8020.|
|04.06.2018 03:47||stgatilov||New Issue|
|04.06.2018 03:47||stgatilov||Status||new => assigned|
|04.06.2018 03:47||stgatilov||Assigned To||=> stgatilov|
|04.06.2018 03:49||stgatilov||Relationship added||related to 0004810|
|11.06.2018 09:41||stgatilov||Target Version||TDM 2.07 =>|
|20.01.2019 07:17||stgatilov||Target Version||=> TDM 2.08|
|24.02.2019 12:55||stgatilov||Note Added: 0011652|
|24.02.2019 14:52||stgatilov||Note Added: 0011653|
|24.02.2019 14:52||stgatilov||Note Edited: 0011653||View Revisions|
|25.02.2019 14:28||stgatilov||Note Added: 0011659|
|25.02.2019 15:27||stgatilov||Note Added: 0011660|
|25.02.2019 16:46||stgatilov||Summary||Remove boost from tdm_update (and from SVN) => Remove boost (and libsvn) from tdm_update|
|25.02.2019 16:46||stgatilov||Description Updated||View Revisions|
|25.02.2019 16:47||stgatilov||Note Added: 0011661|
|04.03.2019 14:50||stgatilov||Note Added: 0011667|
|04.03.2019 14:50||stgatilov||Status||assigned => resolved|
|04.03.2019 14:50||stgatilov||Fixed in Version||=> TDM 2.08|
|04.03.2019 14:50||stgatilov||Resolution||open => fixed|