Skip to content

feat: require C++23 and update CI to macOS 15 / Xcode 16 - #9037

Merged
timosachsenberg merged 9 commits into
developfrom
feature/require-cpp23
Jun 2, 2026
Merged

timosachsenberg merged 9 commits into
developfrom
feature/require-cpp23

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump C++ standard from C++20 to C++23 in compiler_flags.cmake, add_library_macros.cmake, and contrib/CMakeLists.txt
  • Update minimum compiler versions: GCC 13, Clang 17, AppleClang 16 (Xcode 16), VS 2022 17.6
  • Migrate macOS CI runners from macos-14 to macos-15 with Xcode 16.4 and MACOSX_DEPLOYMENT_TARGET=15.0
  • Update install docs (macOS, Windows) and README to reflect C++23 requirement

Test plan

  • CI passes on all platforms (macOS 15, Ubuntu, Windows)
  • macOS build picks up Xcode 16.4 / AppleClang 17
  • pyOpenMS wheel builds succeed on macos-15
  • Contrib builds with updated compiler version checks

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • CI: macOS runners updated to macOS 15 with Xcode 16.4; macOS deployment target raised to 15.0. Ubuntu clang++ bumped to 18. Wheel build/test targets and macOS wheel build settings adjusted. Minimum C++ standard raised to C++23.
  • Documentation

    • Installation prerequisites updated: macOS requires Xcode 16+; Windows guidance updated to Visual Studio 2022.

Bump the C++ standard from C++20 to C++23 across the build system
(compiler_flags.cmake, add_library_macros.cmake, contrib). Update
minimum compiler versions: GCC 13, Clang 17, AppleClang 16 (Xcode 16),
VS 2022 17.6. Migrate macOS CI runners from macos-14 to macos-15 with
Xcode 16.4 and MACOSX_DEPLOYMENT_TARGET=15.0. Update install docs and
README accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

CI macOS runners and Xcode/toolchain were bumped to macos-15 / Xcode 16.4, MACOSX_DEPLOYMENT_TARGET set to 15.0, Ubuntu clang++ advanced to 18; project C++ standard raised to C++23 with ARM/AArch64 non-MSVC undef flags; docs and one exception-argument string updated.

Changes

Build & Toolchain

Layer / File(s) Summary
CI matrix and runners
.github/workflows/openms_ci_matrix_full.yml, .github/workflows/pyopenms-wheels-cibuildwheel.yml
macOS runner entries changed macos-14 → macos-15; Xcode/toolchain 15.4 → 16.4; MACOSX_DEPLOYMENT_TARGET 14.0 → 15.0; Ubuntu clang++ 17 → 18; macOS wheel build/test matrices updated.
C++ standard and ARM flags
cmake/compiler_flags.cmake, cmake/add_library_macros.cmake, README.md
Required C++ standard raised cxx_std_20 → cxx_std_23; added non-MSVC ARM/AArch64 PUBLIC compile-options undefining __STDCPP_FLOAT16_T__, __STDCPP_FLOAT32_T__, __STDCPP_FLOAT64_T__.
Documentation updates
doc/doxygen/install/install-macs.doxygen, doc/doxygen/install/install-win.doxygen, README.md
macOS docs now state Xcode 16+; Windows docs updated to Visual Studio 2022 (17.6+) and example toolchain/generator paths adjusted; README mentions C++23.
Source: exception argument
src/openms/source/CHEMISTRY/ModificationDefinition.cpp
Exception::InvalidValue now receives "" instead of nullptr as the final argument (no control-flow change).

Possibly related PRs

  • OpenMS/OpenMS#9267 — modifies openms_add_compiler_flags() (related CMake compiler-flag changes).
  • OpenMS/OpenMS#8249 — updates Xcode selection/compiler_ver in CI workflows (overlapping workflow edits).
  • OpenMS/OpenMS#8235 — advances macOS runner/toolchain entries in CI matrix (overlap with macOS runner updates).

Suggested labels

Review effort 2/5

Suggested reviewers

  • jpfeuffer
  • poshul
  • cbielow

Poem

🐰
I hopped from twenty to twenty-three,
macOS-15 beneath my tree,
Xcode rose and clang climbed too,
Docs and wheels adjusted through and through,
A tiny empty-string now warms my glee.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading to C++23 and updating CI infrastructure to macOS 15/Xcode 16, matching the primary objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/require-cpp23

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@doc/doxygen/install/install-win.doxygen`:
- Around line 41-42: Update the remaining Visual Studio 2019 references in
install-win.doxygen to match the new VS2022 requirement: search for and replace
occurrences of the generator/name tokens "Visual Studio 16 2019", "VS2019",
"2019\\Community", and "msvc2019_64" with the VS2022 equivalents (e.g., "Visual
Studio 17 2022", "VS2022", the 2022 Community path, and "msvc2022_64") so the
documented CMake generators and paths are consistent with the C++23/Visual
Studio 2022 requirement stated in the bolded block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2af52927-cab4-4324-a1eb-a20cee63cc8c

📥 Commits

Reviewing files that changed from the base of the PR and between 2d22938 and fb790ff.

📒 Files selected for processing (7)
  • .github/workflows/openms_ci_matrix_full.yml
  • .github/workflows/pyopenms-wheels-cibuildwheel.yml
  • README.md
  • cmake/add_library_macros.cmake
  • cmake/compiler_flags.cmake
  • doc/doxygen/install/install-macs.doxygen
  • doc/doxygen/install/install-win.doxygen

Comment thread doc/doxygen/install/install-win.doxygen Resolved
- Fix ModificationDefinition.cpp: replace nullptr with "" for
  std::string parameter (C++23 deletes std::string(nullptr_t))
- Bump CI Clang from 17 to 18 to avoid known libstdc++ 14 bug
  with C++23 pair-like concept (affects std::map/unordered_map)
- Update install-win.doxygen: replace stale VS2019 references
  with VS2022 (generators, paths, Qt toolchain names)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/openms/source/CHEMISTRY/ModificationDefinition.cpp (1)

91-92: Correct fix for C++23 compatibility.

This change properly addresses the C++23 requirement where std::string(nullptr) is undefined behavior. Passing "" is valid since the parameter is const std::string&.

For consistency with other call sites (e.g., ResidueModification.cpp:642-643 which uses "nullptr") and slightly more informative error messages, you could consider using "nullptr" instead:

     throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
-                                    "No modification defined", "");
+                                    "No modification defined", "nullptr");

This would produce "the value 'nullptr' was used but is not valid" rather than "the value '' was used but is not valid". However, "" is also perfectly acceptable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/openms/source/CHEMISTRY/ModificationDefinition.cpp` around lines 91 - 92,
The throw using Exception::InvalidValue passes nullptr (undefined in C++23);
replace that nullptr argument with a valid std::string (e.g., "" or the more
informative "nullptr") in the throw expression so the const std::string&
parameter receives a valid value; update the throw in ModificationDefinition.cpp
where Exception::InvalidValue is called to use the chosen string literal to
match other call sites like ResidueModification.cpp.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/openms/source/CHEMISTRY/ModificationDefinition.cpp`:
- Around line 91-92: The throw using Exception::InvalidValue passes nullptr
(undefined in C++23); replace that nullptr argument with a valid std::string
(e.g., "" or the more informative "nullptr") in the throw expression so the
const std::string& parameter receives a valid value; update the throw in
ModificationDefinition.cpp where Exception::InvalidValue is called to use the
chosen string literal to match other call sites like ResidueModification.cpp.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3722e452-4580-423a-8357-999861b21d1a

📥 Commits

Reviewing files that changed from the base of the PR and between fb790ff and 4a3e17d.

📒 Files selected for processing (3)
  • .github/workflows/openms_ci_matrix_full.yml
  • doc/doxygen/install/install-win.doxygen
  • src/openms/source/CHEMISTRY/ModificationDefinition.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • doc/doxygen/install/install-win.doxygen
  • .github/workflows/openms_ci_matrix_full.yml

timosachsenberg and others added 2 commits March 30, 2026 14:21
C++23's <stdfloat> defines std::float16_t/float32_t/float64_t which
conflict with ARM NEON's global-scope typedefs when 'using namespace
std;' is present. Suppress the __STDCPP_FLOAT*_T__ feature macros on
ARM targets so <stdfloat> types are never defined. OpenMS does not use
C++23 extended floating-point types.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove -U__STDCPP_FLOAT128_T__ and -U__STDCPP_BFLOAT16_T__ as those
types have no ARM NEON conflict and suppressing them breaks Boost.Math
which references std::float128_t. Only suppress float16/32/64 which
actually conflict with NEON typedefs.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@timosachsenberg

Copy link
Copy Markdown
Contributor Author

@jpfeuffer got this to compile now. Would make some range code a bit easier to deal with. Opinions?

@pjones

pjones commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

This is great! I'm looking forward to deleting workarounds in my PIP-ECHO code.

@jpfeuffer

Copy link
Copy Markdown
Contributor

If you build on macos15, all dependencies will have been built with min os version 15 by brew. This means you will stop supporting macos14 unless you build all dependencies from scratch or with conda. It will be a tradeoff

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

K then let’s do it.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Note that macos14 is 2.5 years old and still officially supported by Apple on all hardware supporting it.

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

I checked and as we only support arm64 at least in principle all hardware could be updated to at least macos 15. I am a bit tired of mac holding us back in terms of C++ features etc.

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

@poshul @cbielow fine with you?

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

GitHub is moving to MacOS 26 and deprecating 14 so I think we are good to got here...
@cbielow and @poshul I assume you are fine with it

timosachsenberg and others added 3 commits June 1, 2026 08:25
PR #9037 raised the required C++ standard to C++23 and updated the
macOS/Windows build instructions and README accordingly, but the Linux
build guide stated no compiler requirement at all.

- install-linux.doxygen: add a "Compiler Requirements" section
  (GCC 13+ / Clang 17+) and bump the documented Ubuntu/Debian baseline
  from 22.04 to 24.04 (24.04's default build-essential toolchain
  satisfies C++23; CI runs on ubuntu-24.04).
- AGENTS.md: update the C++ standard (C++20 -> C++23) and align the
  stale Windows/macOS minimum-compiler notes (VS 2022 17.6+, Xcode 16+).

https://claude.ai/code/session_01Hz9sx6kxhaoN4orfZJZtcX
@timosachsenberg
timosachsenberg merged commit 2f29314 into develop Jun 2, 2026
42 checks passed
@timosachsenberg
timosachsenberg deleted the feature/require-cpp23 branch June 2, 2026 10:58
timosachsenberg pushed a commit that referenced this pull request Sep 26, 2026
…23 requirement

The macOS line cited #8486, #8494 and #8527, which are notarization PRs;
the references came along from a neighbouring bullet when the changelog
was condensed. The minimum came from #8450 (14, with the Intel builds
dropped), #9037 (15, together with C++23 and the macos-15 runners) and
#10202 (15 for the wheels).

The 3.6.0 changelog never said that OpenMS now needs C++23 (#9037). It
now names the minimum compilers from cmake/min_compiler_versions.cmake.

The dataframe page shows default_missing_values=None, the actual default
of PeptideIdentificationList.to_df(), and what None stands for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
timosachsenberg added a commit that referenced this pull request Sep 26, 2026
…5 minimum (#10285)

* [DOC,PYOPENMS] Update the user guide to the 3.6 API; macOS 15 minimum

The user-guide examples still used the 3.5.0 API. Replayed against a
3.6 wheel built from develop (with the plot_spectrum fix of #10280),
20 of the 46 pages failed, 14 of which had passed on 3.5.0. Now 36
pass. Three still fail, two on bindings that are missing in 3.6 and
one on #10260 item 4. Two need optional packages (datashader, massql).

- Output arguments are return values: pickExperiment, getAllNames,
  digest, align, getDecompositions, getTag, ProtXMLFile.load,
  applyVariableModifications, getSpectrumAlignment,
  MassTraceDetection.run, ElutionPeakDetection.detectPeaks and
  filterByPeakWidth, and SimpleSearchEngineAlgorithm.search.
- Strings are str: no .decode(), str keys and arguments instead of
  b"...", and element compositions print with str keys. char arguments
  such as PeptideEvidence.setAABefore take "R" and reject b"R".
- Removed API: pyopenms.String, DPosition1 and the LogConfigHandler
  constructor.
- Deprecated API: get_df() is now to_df(), and
  peptide_identifications_to_df() is now PeptideIdentificationList.to_df().
  The dataframe page documents the to_df() signatures and the columns
  3.6 returns. The merge example is left for #10260 item 4.
- Examples that could not run anywhere: the FAQ snippet used an
  undefined exp, and memory_management and the detailed peptide search
  read files that exist only in a source checkout. They download their
  input now, like the other pages.
- The stand-alone mass decomposition script imports pyopenms again,
  which also makes the prose's "line 8 and 9" right. The SpectrumLookup
  regex in ms_data is a raw string, which removes the invalid escape
  sequence warning.

CHANGELOG: the minimum macOS version is 15, not 14. The wheels are
built with MACOSX_DEPLOYMENT_TARGET 15.0. In the 2026-09-24 installer,
libOpenMS links a bundled libzstd whose minimum OS is 15.0, so every
TOPP tool needs macOS 15, not only the GUI, whose Qt dependencies are
built for 15 as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] CHANGELOG: cite the PRs behind the macOS minimum; state the C++23 requirement

The macOS line cited #8486, #8494 and #8527, which are notarization PRs;
the references came along from a neighbouring bullet when the changelog
was condensed. The minimum came from #8450 (14, with the Intel builds
dropped), #9037 (15, together with C++23 and the macos-15 runners) and
#10202 (15 for the wheels).

The 3.6.0 changelog never said that OpenMS now needs C++23 (#9037). It
now names the minimum compilers from cmake/min_compiler_versions.cmake.

The dataframe page shows default_missing_values=None, the actual default
of PeptideIdentificationList.to_df(), and what None stands for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] peptide_search: call removeDanglingProteinReferences, not its 3.5 name

updateProteinReferences is the pyOpenMS 3.5 name. The bindings PR brings
it back only as a deprecated alias, and the page replay reports an
example that teaches a deprecated call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

---------

Co-authored-by: Claude <[email protected]>
timosachsenberg added a commit that referenced this pull request Sep 27, 2026
* [BUILD] Make the macOS package declare the macOS it needs

The package build targeted macOS 14, but it runs on macos-15, and the
Homebrew libraries the package bundles (Qt's dependencies, ICU, zstd)
are built for 15. The 3.6.0 installer therefore installed on macOS 14,
where the tools then failed to load. The minimum has been 15 since
#9037, which moved the runners to macos-15.

- .github/actions/build/action.yml: macosx_deployment_target defaults to
  15.0, with the reason it has to match the runner. This answers the
  FIXME that asked whether it is needed.
- The installer refuses an older macOS. cmake/Modules/
  CPack.distribution.dist.in is CMake's productbuild Distribution
  template, unchanged from CMake 3.24 to 4.1, plus an
  <allowed-os-versions> element with the deployment target. CPack finds
  it through CMAKE_MODULE_PATH. CPACK_APPLE_PKG_INSTALLER_CONTENT cannot
  carry the element, because CPack generates that variable. The
  attribute is single-quoted because CPack copies CPACK_* values into
  CPackConfig.cmake without escaping them.
- TOPPView, TOPPAS and INIFileEditor declare the deployment target as
  LSMinimumSystemVersion instead of a hardcoded 12.0. Builds without a
  target keep 12.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [BUILD] Put the installer's macOS minimum inside <volume-check>

Apple's Distribution XML reference allows <allowed-os-versions> only
inside <volume-check>; it is not a valid child of <installer-gui-script>.
<volume-check> requires a script attribute, so it gets script='true': the
volume passes the script, and the allowed-os-versions child adds the OS
check. The value stays single-quoted for CPackConfig.cmake.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

* [DOC] CHANGELOG: bin/qt.conf is new in the macOS package, not restored

3.5.0's package_mac_productbuild.cmake already had the qt.conf install
commented out, so its package most likely could not load the Qt platform
plugin in ExecutePipeline either. Drop "again" and cite #10280, which
added the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7

---------

Co-authored-by: Claude <[email protected]>
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.

4 participants