Repository navigation
Fix non-ascii paths - #9452
Fix non-ascii paths#9452
Conversation
…_MULTI_CONFIG is a property, not a variable; needs translation)
… target_name); support all muti-config generators on Windows. No just VS
|
@cbielow The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-05 09:49:50.529917471 +0000
+++ AUTHORS.new 2026-06-05 09:49:55.945726896 +0000
@@ -22,8 +22,8 @@
- Chirag Dave
- Chris Bauer
- Chris Bielow
- - Christie Mathews
- Christian Ehrlich
+ - Christie Mathews
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
📝 WalkthroughWalkthroughThis PR improves Windows Unicode path handling by updating ChangesWindows Unicode and Multi-Config Path Support
Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/openms/include/OpenMS/SYSTEM/PathUtils.h`:
- Around line 16-19: Add an `@brief` line to the Doxygen block in
src/openms/include/OpenMS/SYSTEM/PathUtils.h: replace the current free-form
comment that starts "Convert a UTF-8 std::string to std::filesystem::path safely
on all platforms." with a Doxygen-style comment that begins with "`@brief` Convert
a UTF-8 std::string to std::filesystem::path safely on all platforms." followed
by a blank line and then the existing details about Windows behavior and the
fallback for non-UTF-8 bytes; update the comment immediately above the
conversion helper in the OpenMS::PathUtils header so it conforms to the coding
guideline.
🪄 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: 103e275f-7592-4fc0-b3c9-4e481388cf7f
📒 Files selected for processing (4)
cmake/add_library_macros.cmakesrc/openms/include/OpenMS/SYSTEM/PathUtils.hsrc/tests/class_tests/openms/executables.cmakesrc/tests/class_tests/openms/source/PathUtils_test.cpp
| /// Convert a UTF-8 std::string to std::filesystem::path safely on all platforms. | ||
| /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8. | ||
| /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8, | ||
| /// so we explicitly construct from u8string. If the bytes are not valid UTF-8 (e.g., a | ||
| /// filename from argv in the ANSI code page), fall back to the native code page. |
There was a problem hiding this comment.
Add @brief tag to Doxygen comment.
The Doxygen comment must start with @brief per coding guidelines.
📝 Proposed fix
- /// Convert a UTF-8 std::string to std::filesystem::path safely on all platforms.
- /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8,
- /// so we explicitly construct from u8string. If the bytes are not valid UTF-8 (e.g., a
- /// filename from argv in the ANSI code page), fall back to the native code page.
+ /// `@brief` Convert a UTF-8 std::string to std::filesystem::path safely on all platforms.
+ ///
+ /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8,
+ /// so we explicitly construct from u8string. If the bytes are not valid UTF-8 (e.g., a
+ /// filename from argv in the ANSI code page), fall back to the native code page.As per coding guidelines: "Use Doxygen documentation with @brief (required), plus blank line, then details"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /// Convert a UTF-8 std::string to std::filesystem::path safely on all platforms. | |
| /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8. | |
| /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8, | |
| /// so we explicitly construct from u8string. If the bytes are not valid UTF-8 (e.g., a | |
| /// filename from argv in the ANSI code page), fall back to the native code page. | |
| /// `@brief` Convert a UTF-8 std::string to std::filesystem::path safely on all platforms. | |
| /// | |
| /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8, | |
| /// so we explicitly construct from u8string. If the bytes are not valid UTF-8 (e.g., a | |
| /// filename from argv in the ANSI code page), fall back to the native code page. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/openms/include/OpenMS/SYSTEM/PathUtils.h` around lines 16 - 19, Add an
`@brief` line to the Doxygen block in
src/openms/include/OpenMS/SYSTEM/PathUtils.h: replace the current free-form
comment that starts "Convert a UTF-8 std::string to std::filesystem::path safely
on all platforms." with a Doxygen-style comment that begins with "`@brief` Convert
a UTF-8 std::string to std::filesystem::path safely on all platforms." followed
by a blank line and then the existing details about Windows behavior and the
fallback for non-UTF-8 bytes; update the comment immediately above the
conversion helper in the OpenMS::PathUtils header so it conforms to the coding
guideline.
jpfeuffer
left a comment
There was a problem hiding this comment.
looks correct. good to go if CI passes
|
thanks! |
… external CMakeLists to LF - Remove external tracker/issue references (#9460 §1, #9452, #9204, #9075, Lxx) from added test comments; comments now describe the durable behavior under test. - Normalize src/tests/external/CMakeLists.txt to LF (matches .gitattributes eol=lf), which also clears the trailing-whitespace (CR) that git diff --check flagged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…only config, downstream Qt contract (#9460) (#9603) * [TEST] Infrastructure (§1): non-ASCII paths, exit-code mapping, read-only config, downstream Qt contract (#9460) Close the remaining §1 [AUTO] gaps of the OpenMS 3.6.0 pre-release testing plan (#9460). Tests only. - PathUtils_test: Windows-only UNC + ANSI-codepage to_path() cases under #ifdef _WIN32 (L35). - TOPP FileConverter: read AND write through a non-ASCII (UTF-8) path, materialized at test time via `cmake -E copy` (the permanent #9452 regression) (L37). - File_test: pin the "siblings only, no PATH fallback" contract of findSiblingTOPPExecutable (its TODO / #9204) plus a negative findExecutable case (L40). - THIRDPARTY: assert a present-but-failing external program returns EXTERNAL_PROGRAM_ERROR (9), distinct from the EXTERNAL_PROGRAM_NOTFOUND (14) of a missing binary (L41). - UpdateCheck_test (new): an unwritable config dir logs a warning and returns gracefully -- no network request, no crash (the $HOME-not-writable fix #9075) (L45). - external/: a second downstream target that finds Qt6 itself and links Qt6::Core, proving OpenMS exports no transitive Qt6 (L56). Co-Authored-By: Claude Opus 4.8 <[email protected]> * [TEST] Make CometAdapter failing-executable test portable * [TEST] Address review: drop tracker IDs from test comments, normalize external CMakeLists to LF - Remove external tracker/issue references (#9460 §1, #9452, #9204, #9075, Lxx) from added test comments; comments now describe the durable behavior under test. - Normalize src/tests/external/CMakeLists.txt to LF (matches .gitattributes eol=lf), which also clears the trailing-whitespace (CR) that git diff --check flagged. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Description
fix regression introduced in #8938 for filepaths on Windows containing non-ASCII characters (e.g.
ä).Also: fix missing copy of openms_thermo_bridged.dll to test's /bin folder (
GENERATOR_IS_MULTI_CONFIGis a property, not a variable; needs translation) and potentially support more multi-config generators on Windows.Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit
Bug Fixes
Tests