Validate flag_source library symbols exist at codegen time

Table of Contents

This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

What

For a flagged_combo detail-field whose flag_source has no shared combo helper (i.e. anything other than currency), codegen emits a call to combo_fetch (a fetch_<source>_codes() function in ores.qt/LookupFetcher.hpp) and, via the Icon columns table, a call to a <source>_flag_icon() accessor in ores.qt/FlagIconHelper.hpp — neither of which codegen checks actually exist. If a flag_source is used for the first time and the two hand-written library additions haven't been made yet, the failure only surfaces as a plain C++ "use of undeclared identifier" error at compile time, with nothing in the codegen output pointing at the missing symbols or what to add. Add a lint/generation-time check (e.g. grep the target headers for the expected symbol names, similar to how other codegen facets validate their inputs) that fails fast with an actionable message instead.

Why

Surfaced while adding book's rates_centre_code flagged_combo field (business_centre flag source, first-ever non-currency flagged_combo in the codebase) — see Adding a flagged combo field to a codegen entity for the full process and why the two hand-written additions are needed at all.

References

See also

Emacs 29.3 (Org mode 9.6.15)