Skip to content

[API,BUILD] Remove Boost from installed public headers - #10212

Closed
timosachsenberg wants to merge 2 commits into
OpenMS:developfrom
timosachsenberg:refactor/private-boost
Closed

timosachsenberg wants to merge 2 commits into
OpenMS:developfrom
timosachsenberg:refactor/private-boost

Conversation

@timosachsenberg

Copy link
Copy Markdown
Contributor

Installed OpenMS headers expose Boost types and currently make downstream shared-library builds locate Boost. This change removes that requirement.

  • Encapsulate regular expressions, the shuffle engine, identification indexes, heaps and deconvolution bitsets behind OpenMS interfaces. Retain the existing Boost regex syntax, indexed-record semantics and seeded shuffle sequence internally.
  • Use standard C++ storage and helpers where appropriate, stop installing the internal IDBoostGraph header, and make Boost targets private. Static consumers still resolve the required Boost link dependencies.
  • Update internal callers, TOPP tools and Python regex bindings. Document the C++ API/ABI changes and downstream migration.
  • Add an installed-consumer fixture that disables Boost package discovery and shadows Boost headers with compile errors. It compiles all 817 installed core/OpenSwathAlgo headers and runs a consumer using the changed interfaces. ParquetFile's existing Arrow headers are supplied only to its dedicated header unit.

This is a C++ API/ABI change: downstream C++ code and extensions must be rebuilt. Identification collections expose the supported IDDataContainer API and value-returned ordered views; iterators carry owner and value pointers without per-iterator allocation. Regex arguments use OpenMS::RegularExpression, MetaInfo::MapType uses sorted vector storage, and RandomShuffler exposes seed() instead of its Boost engine.

Validated locally on Linux with GCC 13.3, C++23, a Debug build (-O0 -g1), Boost 1.83 and GUI disabled:

  • Core and CLI libraries, FuzzyDiff and six affected TOPP executables built.
  • All 34 selected C++ regression tests passed, including ID containers/conversion/OMSFile, metadata, regex/digestion, clustering, shuffle, MRMAssay and FLASHDeconv.
  • 28 selected TOPP checks, 24 existing installed-consumer checks, and six package/header-set checks passed.
  • The new installation, 817-header compilation and Boost-free consumer checks passed.
  • Both Python native-ID parser tests passed against the rebuilt metadata binding module.

Windows, macOS, GUI builds and the complete pyOpenMS test suite were not run locally.

Constrain IDDataContainer equality to equality-comparable records so MSVC
can instantiate containers whose records have no operator==. Cover both
unsupported equality and supported value comparison in the class test.

Include <exception> directly in PeakPickerIM and remove ProSE's unnecessary
Arrow header include; its OpenMS helpers accept opaque shared pointers.

Rebuilt the core and CLI libraries, affected tools and regression tests on
Linux. All 20 selected class and TOPP checks passed, including QPX export.

Copy link
Copy Markdown
Contributor Author

Superseded by #10223 and closing — no work is lost.

#10223 contains both commits from this branch (ddf03cf) plus the fix for the CI failure here. Making Boost::boost private also removed the one public include directory that happened to carry the rest of the dependency prefix, so installed headers including a private dependency stopped resolving: every platform failed on ParquetFile.h:14: arrow/api.h: No such file or directory while building OpenSwathWorkflow.cpp, and all_verify_interface_header_sets plus the new Boost-free consumer would have hit the same wall for ParquetFile.h and RationalScan2ImConverter.h. Both headers name a private dependency in their declarations, so they now join the Xerces and SQLite adapters on OpenMS_private_headers.

#10223 is green on Linux g++/clang++, Linux arm and macOS (3002/3002 tests, including TestExternalCodeNoBoost), on the full pyopenms wheel matrix, and on the header-set, sphinx and cppcheck checks; the Windows build is still running.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant