Skip to content

Conversation

@akrieger
Copy link
Member

@akrieger akrieger commented Dec 27, 2025

Summary

None

Purpose of change

Windows build got too big for its britches. That motivated me to try to migrate to fmt again after seeing it was a dominant contributor to object file size in the linux build.

Describe the solution

Use fmt::printf so we don't have to change any of our translation strings, ideally.

Describe alternatives you've considered

Idk finding some other way of reducing aggregate binary size. The problem is debug info is huge and ccache is important for our ci time to stay sane.

Testing

Before:

Windows:
$ du -shb objwin/Release/x64/Cataclysm-lib-vcpkg-static/Cataclysm-lib-vcpkg-static-Release-x64.lib
4281132738      objwin/Release/x64/Cataclysm-lib-vcpkg-static/Cataclysm-lib-vcpkg-static-Release-x64.lib
Linux:
akrieger@Bones:~/Cataclysm-DDA$ du -sh cataclysm.a cataclysm-tiles
581M    cataclysm.a
261M    cataclysm-tiles

After:

Windows:
$ du -shb objwin/Release/x64/Cataclysm-lib-vcpkg-static/Cataclysm-lib-vcpkg-static-Release-x64.lib
4091019008      objwin/Release/x64/Cataclysm-lib-vcpkg-static/Cataclysm-lib-vcpkg-static-Release-x64.lib
Linux:
akrieger@Bones:~/Cataclysm-DDA$ du -sh cataclysm.a cataclysm-tiles
426M    cataclysm.a
226M    cataclysm-tiles

Additional context

@github-actions github-actions bot added Translation I18n [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Limbs Limbs, mutable limbs, and code related to them. astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Dec 27, 2025
@akrieger
Copy link
Member Author

Eh saves like 180 megabytes from the archive which I really shouldn't sneeze at.

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Bionics CBM (Compact Bionic Modules) labels Dec 27, 2025
@github-actions github-actions bot added Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies labels Dec 27, 2025
@github-actions github-actions bot added the Code: Build Issues regarding different builds and build environments label Dec 27, 2025
@akrieger akrieger force-pushed the fmtting branch 2 times, most recently from 170ad25 to 9f2b68c Compare December 27, 2025 22:29
@github-actions github-actions bot added the Code: Tests Measurement, self-control, statistics, balancing. label Dec 27, 2025
@akrieger akrieger force-pushed the fmtting branch 6 times, most recently from b80fe1c to fb74872 Compare December 28, 2025 16:40
@github-actions github-actions bot added the Code: Tooling Tooling that is not part of the main game but is part of the repo. label Dec 28, 2025
@akrieger akrieger force-pushed the fmtting branch 2 times, most recently from e83570f to fbbf5a9 Compare December 28, 2025 19:04
@github-actions github-actions bot added the Game: Achievements / Conducts / Scores Player goals and how they are tracked. label Dec 28, 2025
@akrieger akrieger changed the title [WIP] Use fmt instead of string_formatter Use fmt instead of string_formatter Dec 30, 2025
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 30, 2025
@akrieger akrieger force-pushed the fmtting branch 2 times, most recently from f49f266 to a5b38a9 Compare December 31, 2025 04:15
@akrieger akrieger marked this pull request as draft December 31, 2025 12:57
@akrieger
Copy link
Member Author

Looks green enough but I want to play the game with it more and maybe change a return to a debugmsg to catch more format string issues.

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 2, 2026
@github-actions github-actions bot added the Missions Quests and missions label Jan 5, 2026
@akrieger akrieger force-pushed the fmtting branch 2 times, most recently from b23e54a to 4071ac0 Compare January 6, 2026 07:42
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 6, 2026
@akrieger akrieger marked this pull request as ready for review January 6, 2026 19:56
@akrieger
Copy link
Member Author

akrieger commented Jan 7, 2026

Bizarre clang-tidy error. I think it's a false positive but I need to ask around.

@akrieger
Copy link
Member Author

akrieger commented Jan 7, 2026

Thought about it a bunch, asked around, got enough confirmation it's a false positive that I'll suppress it (including from someone who actually read the implementation of the check). Need to actually put that up though still.

@github-actions github-actions bot added Map / Mapgen Overmap, Mapgen, Map extras, Map display Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Jan 8, 2026
@akrieger
Copy link
Member Author

akrieger commented Jan 8, 2026

The base commit is #84562 which can/should land separately.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astyled astyled PR, label is assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Code: Tests Measurement, self-control, statistics, balancing. Code: Tooling Tooling that is not part of the main game but is part of the repo. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Game: Achievements / Conducts / Scores Player goals and how they are tracked. Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Limbs Limbs, mutable limbs, and code related to them. Map / Mapgen Overmap, Mapgen, Map extras, Map display Missions Quests and missions Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Translation I18n Vehicles Vehicles, parts, mechanics & interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant