Repository navigation
[FIX] -write_cwl no longer aborts TOPP tools in builds without TDL - #10459
Conversation
Without ENABLE_TDL (the default), ParamCWLFile threw std::runtime_error after opening the target file. TOPPBase only catches OpenMS exceptions, so every TOPP tool given -write_cwl or -write_nested_cwl called std::terminate (SIGABRT) and left an empty <Tool>.cwl behind. - ParamCWLFile: add isSupported(); throw Exception::NotImplemented (before opening the file) and Exception::UnableToCreateFile instead of std exceptions. - TOPPBase: report missing CWL support with a clear message and ILLEGAL_PARAMETERS before writing anything. - Tests: ParamCWLFile_test, and TOPP_FileMerger_write*_cwl_noTDL checking the exact exit code, message, and that no file is created (check_exit_code.cmake gains ABSENT_FILE). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017T36hh5UMDeyMRwLiBVkbi
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughParamCWLFile now reports whether CWL writing is supported and uses OpenMS exceptions for unsupported writing and file-creation failures. TOPPBase rejects both CWL-writing options when support is unavailable. Tests cover these behaviors and check that unsupported commands do not leave an output file. ChangesCWL writing support
Suggested reviewers: Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to Builds without TDL now report a clear error for either CWL option without creating an output file. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (2 skipped: 2 unsupported.)
✨ 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. A rabbit checks the CWL gate, Comment |
Resolve the CHANGELOG conflict by keeping both entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017T36hh5UMDeyMRwLiBVkbi
Combines the entries of the open CHANGELOG pull requests #10387, #10483, #10511, #10535, #10555 and #10580 into one change on top of develop, and covers #10252 and #10267, whose edits develop already carries. - OpenMS Library: PeptDeepLibraryPredictor (#10380), OpenSwathLibraryPreparation (#10373), BedRModFile (#10529), FLASH averagine/cosine fix (#10543), WebAssembly-found fixes (#10558), MzMLSqliteHandler array length check (#10471), Percolator data race (#10474). #10471 and #10543 were each proposed by two of the PRs; they appear once. - TOPP tools: OpenDIA as a new tool (#10373), qualified by the review on #10387 (peptidoform inference needs workflow:working_format sqlite), and the NucleicAcidSearchEngine options of #10526, #10529-#10532, moved from the top of the release block into the tool's section together with the NucleicAcidSearchEngine bullet that sat there outside any section. - Restore the ProteomicsLFQ -feat_dir entry (#10481, #10486) and the three FileInfo entries (#10497, #10498, #10499) that the merge of #10470 dropped, and remove the second copy of the -write_cwl entry it added (cited #10459, tab indentation replaced by spaces). - Build System: ONNX Runtime versioned files and symlinks (#10465). - 3.6.0: #10255 made WITH_WNETALIGN opt-in; it did not change the ONNX Runtime requirement (review on #10267). Claude-Session: https://claude.ai/code/session_01QfTdEQjN4tBfS49WcriPYu Co-authored-by: Claude <[email protected]>
Problem
In a build without CWL support (
ENABLE_TDL=OFF, the default and what CI/nightlies use), every TOPP tool given-write_cwlor-write_nested_cwlcrashed:Backtrace:
ParamCWLFile::writeCWLToStream→ParamCWLFile::store→TOPPBase::handleWriteCommands_→TOPPBase::main.Root cause
ParamCWLFilethrewstd::runtime_error(andstd::ios::failurefor unwritable files), butTOPPBase::mainonly catchesException::BaseExceptionand its subclasses. The exception reachedstd::terminate. The file had already been opened, so an empty.cwlwas left.Changes
ParamCWLFile: newstatic bool isSupported(). Without TDL,store()throwsException::NotImplementedbefore opening the file. An unwritable target throwsException::UnableToCreateFileinstead ofstd::ios::failure.TOPPBase: if CWL is requested but not supported, it prints "Writing CWL files is not supported by this build of OpenMS. Rebuild OpenMS with -DENABLE_TDL=ON …" and returnsILLEGAL_PARAMETERS(6). Nothing is written.ParamCWLFile_test, which covers both TDL and non-TDL builds.TOPP_FileMerger_write_cwl_noTDLandTOPP_FileMerger_write_nested_cwl_noTDL, registered whenENABLE_TDLis OFF. They usecheck_exit_code.cmaketo check the exact exit code and message. A new optionalABSENT_FILEcheck asserts that no file is left behind.Verification
ParamCWLFile_test, both new TOPP tests,TOPPWRITECTD_FileMergerandTOPP_FileMerger_cwl_filelistpass.ENABLE_TDL=ONbuild:ParamCWLFile_testpasses,FileMerger -write_cwlwrites a valid CWL file, and an unwritable directory still gives exit 5.🤖 Generated with Claude Code
https://claude.ai/code/session_017T36hh5UMDeyMRwLiBVkbi
Generated by Claude Code
Summary by CodeRabbit