Conversation
fmt's ADL `format_as` hook only reaches non-enum types from fmt 10, so the three types using it here -- human_size, the XWingKeys-derived device and account keys, and devices.cpp's Processing -- are unformattable against a system fmt 9 (Debian bookworm), which fails as a wall of template errors deep inside fmt rather than as anything that names them. Specializations work from fmt 9 through 12, and are also the only form std::format offers, so nothing here has to be rewritten if we ever move to it. The output is unchanged. human_size's formatter goes in session/format.hpp with the others, keeping session/util.hpp free of fmt headers as before; what was its format_as is now human_size::str(). `fmt::format_context` is spelled out in the devices.cpp formatters: an out-of-line partial specialization does not get namespace fmt into its unqualified lookup on gcc 12 with fmt 9, where the unqualified name is not found and the parameter silently becomes `int&`.
Every debian_build now installs the libraries the distro has and configures with -DBUILD_STATIC_DEPS=OFF, rather than compiling its own copy of each dependency. That is considerably faster, and it is what puts distro library versions in front of our code: Debian 12's fmt 9 is a version we have to support and was, until now, never built against in CI. A too-old system library still falls back to building that one dependency (libsodium on Debian 12 and Ubuntu 22.04), so this does not narrow what we can build on. One full static-deps build is kept, on Ubuntu 22.04 as the oldest distribution we support, so that the vendored dependency builds -- what the release artifacts use -- keep being exercised.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
format_asonly started working with fmt starting in version 10, and so builds on bookworm using system libfmt were failing; this fixes it.This also changes CI jobs to use system libs as much as possible, for faster builds since in many cases we don't have to rebuild dependencies. It keeps a jammy-based static build just to ensure that that path still works properly.