Skip to content

[DOC] Migration guide from OpenMS::String; remove the docs that still teach it - #10298

Merged
timosachsenberg merged 1 commit into
developfrom
claude/confident-lovelace-muuw2w-string-migration-docs
Sep 28, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
claude/confident-lovelace-muuw2w-string-migration-docs

Conversation

@timosachsenberg

Copy link
Copy Markdown
Contributor

Description

OpenMS 3.6 replaced OpenMS::String with std::string (#9450, #9468). This is the biggest C++ API break of the release, yet there was no migration guide, and several documents still showed the removed API. This is the fifth of the 3.6 documentation PRs (after #10293, #10296 and #10297); it changes documentation only.

New page manual/develop/string-migration.md ("Migrating from OpenMS::String"), linked from the developer page and its toctree:

  • What changed: std::string/std::string_view, StringList, the StringUtils free functions, and the removed headers.
  • A table of each 3.5 String member and its replacement. Every old name was checked against String.h of release/3.5.0, and every new one against the current StringUtils.h, ListUtils.h and TypeAliases.h.
  • The changes the compiler does not catch:
    • DataValue and ParamValue convert to std::string strictly: they throw Exception::ConversionError for non-strings (DataValue.h, ParamValue.cpp). The removed String(DataValue) was lenient. The replacement is StringUtils::toStr(), as the header's own note says.
    • s += 5 still compiles without StringUtils.h, but through std::string::operator+=(char): it appends the character with code 5. s + 5 does not compile without the header.
    • std::to_string(double) writes six decimals.
    • StringUtils::prefix(s, c) and suffix(s, c) return the whole string when c is missing, whereas 3.5's String::prefix(c) and suffix(c) threw ElementNotFound.

Stale references fixed

  • developer_cpp_guide.doxygen, developer_coding_conventions.doxygen, TargetedQuantitation.doxygen, AGENTS.md and .github/copilot-instructions.md.
    • This is the text of 976e0dc from the unmerged branch claude/inspiring-gates-23z7lr, which applied cleanly.
    • At least seven such branches carried variants of this fix, and none reached develop.
  • developer-faq.md: it recommended String tmp_dir and Qt's QDir, but Qt is GUI-only now. It now points to SystemSettings::getTempDirectory() and TempDir.
  • adding-new-tool-to-topp.md: StringList::create does not exist; it is now ListUtils::create<std::string>.
  • src/pyOpenMS/CLAUDE.md and README_WRAPPING_NEW_CLASSES.md: the OpenMS::String caster is gone; std::string uses std_string_bytes_caster.h.

CHANGELOG: the existing BREAKING entry now points to the guide. It is a line inside that entry rather than a new Documentation entry, because #10293, #10296 and #10297 already add lines between every pair of Documentation entries.

Validation: the OpenMS Sphinx docs build without warnings. The new page is in the toctree, and its in-page anchors (#datavalue-to-string etc.) resolve.

Checklist

  • Make sure that you are listed in the AUTHORS file (n/a)
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas (documentation only)
  • New and existing unit tests pass locally with my changes: n/a, documentation only; the Sphinx build is checked above.
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7


Generated by Claude Code

… teach it

OpenMS 3.6 replaced OpenMS::String with std::string (#9450, #9468), but
there was no migration guide, and several documents still showed the
removed API.

New page manual/develop/string-migration.md: the replacement for each
member of the 3.5 String (checked against the 3.5 String.h and the
current StringUtils.h), and the changes the compiler does not catch:
- the DataValue/ParamValue conversion to std::string is strict and
  throws, where String(DataValue) was lenient (use StringUtils::toStr);
- `s += 5` without StringUtils.h appends the character 5, and
  std::to_string writes six decimals;
- StringUtils::prefix/suffix(s, c) return the whole string where
  String::prefix/suffix(c) threw ElementNotFound.

Stale references fixed: developer_cpp_guide, coding conventions and
TargetedQuantitation Doxygen pages, AGENTS.md and the Copilot
instructions (the text of the unmerged 976e0dc), plus the developer
FAQ (temporary directories via SystemSettings/TempDir instead of Qt),
the new-tool page (ListUtils::create), and the pyOpenMS wrapping guides.

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

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e5d80c16-04a2-4fce-b975-acb52fa0eae1

📥 Commits

Reviewing files that changed from the base of the PR and between 8adb3b1 and dfbd8c7.

📒 Files selected for processing (12)
  • .github/copilot-instructions.md
  • AGENTS.md
  • CHANGELOG
  • doc/doxygen/public/TargetedQuantitation.doxygen
  • doc/doxygen/public/developer_coding_conventions.doxygen
  • doc/doxygen/public/developer_cpp_guide.doxygen
  • doc/openms/docs/manual/develop.md
  • doc/openms/docs/manual/develop/adding-new-tool-to-topp.md
  • doc/openms/docs/manual/develop/developer-faq.md
  • doc/openms/docs/manual/develop/string-migration.md
  • src/pyOpenMS/CLAUDE.md
  • src/pyOpenMS/README_WRAPPING_NEW_CLASSES.md

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.

@timosachsenberg
timosachsenberg merged commit b16eb43 into develop Sep 28, 2026
34 checks passed
@timosachsenberg
timosachsenberg deleted the claude/confident-lovelace-muuw2w-string-migration-docs branch September 28, 2026 05:36
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.

2 participants