Skip to content

doc/code_examples: drop stale String.h include (fixes red class-topp build on develop) - #9471

Merged
timosachsenberg merged 1 commit into
developfrom
fix/code-examples-stale-string-header
Jun 10, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
fix/code-examples-stale-string-header

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

develop is red: the build-and-test (… class-topp …) job fails on every platform with

doc/code_examples/Tutorial_IdentificationClasses.cpp:14:
fatal error: OpenMS/DATASTRUCTURES/String.h: No such file or directory

#9468 removed the obsolete String / StringConversions / StringUtilsSimple shim headers, but three code-example tutorials were left still #include-ing the removed <OpenMS/DATASTRUCTURES/String.h>. The class-topp build compiles doc/code_examples/, so it dies there — on develop itself and on every open PR branched after #9468 (that's how I found it: a FragmentIndex PR's CI was red purely from this, not its own changes).

Fix

Remove the dead include from the three affected files:

  • doc/code_examples/Tutorial_IdentificationClasses.cpp
  • doc/code_examples/Tutorial_MetaInfo.cpp
  • doc/code_examples/Tutorial_Logger.cpp

None of them use the String type (verified), so the include is simply dropped — no replacement needed. A full-repo grep confirms these are the only three files still referencing the removed header.

Verification

All three targets build and link cleanly locally (Tutorial_IdentificationClasses, Tutorial_Logger, Tutorial_MetaInfo), where they failed to compile before.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Cleaned up tutorial code examples to improve clarity and maintainability for developers learning from the documentation.

#9468 removed the obsolete String/StringConversions/StringUtilsSimple shim
headers, but three code-example tutorials still include
<OpenMS/DATASTRUCTURES/String.h>. That breaks the class-topp CI build (which
compiles doc/code_examples) on develop and on every branch based on it, e.g.:

  doc/code_examples/Tutorial_IdentificationClasses.cpp:14: fatal error:
  OpenMS/DATASTRUCTURES/String.h: No such file or directory

None of the three files use the String type, so the include is simply removed.
All three compile and link again locally.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Timo Sachsenberg

Please consider applying the following patch:

--- AUTHORS	2026-06-10 12:01:46.767945463 +0000
+++ AUTHORS.new	2026-06-10 12:01:51.650236986 +0000
@@ -22,8 +22,8 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 14e14c32-2da3-482a-9a32-df75e6e45420

📥 Commits

Reviewing files that changed from the base of the PR and between fe61b75 and 6df600b.

📒 Files selected for processing (3)
  • doc/code_examples/Tutorial_IdentificationClasses.cpp
  • doc/code_examples/Tutorial_Logger.cpp
  • doc/code_examples/Tutorial_MetaInfo.cpp
💤 Files with no reviewable changes (3)
  • doc/code_examples/Tutorial_IdentificationClasses.cpp
  • doc/code_examples/Tutorial_MetaInfo.cpp
  • doc/code_examples/Tutorial_Logger.cpp

📝 Walkthrough

Walkthrough

Three tutorial example files were updated to remove unused String.h includes. Tutorial_IdentificationClasses.cpp also added AASequence.h and IdXMLFile.h includes to support its tutorial content.

Changes

Tutorial example include cleanup

Layer / File(s) Summary
Tutorial example include adjustments
doc/code_examples/Tutorial_IdentificationClasses.cpp, doc/code_examples/Tutorial_Logger.cpp, doc/code_examples/Tutorial_MetaInfo.cpp
Removed unused String.h includes from three tutorial examples. Tutorial_IdentificationClasses.cpp updated to add AASequence.h and IdXMLFile.h includes.

📚 Three tutorials tidied up with care,
Removed includes that weren't there,
Added chemistry for acids clear,
Now examples shine without fear! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 change: removing stale String.h includes from three tutorial files to fix build failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/code-examples-stale-string-header

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@timosachsenberg

Copy link
Copy Markdown
Contributor Author

small oversight

@timosachsenberg
timosachsenberg merged commit f49993d into develop Jun 10, 2026
16 of 17 checks passed
@timosachsenberg
timosachsenberg deleted the fix/code-examples-stale-string-header branch June 10, 2026 12:16
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