Skip to content

[FIX] Guard FeatureLinkerWNet in ToolHandler with WITH_WNETALIGN - #9784

Merged
timosachsenberg merged 2 commits into
developfrom
copilot/fix-toolhandler-w-net-registration
Jul 23, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
copilot/fix-toolhandler-w-net-registration

Conversation

Copilot AI commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

ToolHandler::getTOPPToolList() unconditionally registers FeatureLinkerWNet even when built with -DWITH_WNETALIGN=OFF, causing the runtime registry to advertise a tool that doesn't exist on disk. TOPPAS then shows it in the tool tree and fails when invoked.

Mirrors the existing WITH_GUI pattern for ExecutePipeline/ImageCreator:

  • config.h.in — Add #cmakedefine WITH_WNETALIGN 1 so the option propagates to all library consumers
  • ToolHandler.cpp — Guard the FeatureLinkerWNet entry with #ifdef WITH_WNETALIGN
  • ToolHandler_test.cpp — Regression test covering both configurations
#ifdef WITH_WNETALIGN
    tools_map["FeatureLinkerWNet"] = Internal::ToolDescription("FeatureLinkerWNet", cat_linking);
#endif

ToolHandler::getTOPPToolList() now conditionally registers FeatureLinkerWNet
only when WITH_WNETALIGN is enabled at build time. This mirrors the existing
WITH_GUI pattern for ExecutePipeline and ImageCreator.

- Add #cmakedefine WITH_WNETALIGN to config.h.in
- Guard FeatureLinkerWNet entry in ToolHandler.cpp with #ifdef WITH_WNETALIGN
- Add regression test in ToolHandler_test.cpp for both configurations

Closes #9783

Co-authored-by: timosachsenberg <[email protected]>
Copilot AI changed the title [WIP] Fix ToolHandler to not list FeatureLinkerWNet when WITH_WNETALIGN is disabled [FIX] Guard FeatureLinkerWNet in ToolHandler with WITH_WNETALIGN Jul 23, 2026
Copilot AI requested a review from timosachsenberg July 23, 2026 06:36
@timosachsenberg
timosachsenberg marked this pull request as ready for review July 23, 2026 07:33
@timosachsenberg
timosachsenberg merged commit cb84612 into develop Jul 23, 2026
11 checks passed
@timosachsenberg
timosachsenberg deleted the copilot/fix-toolhandler-w-net-registration branch July 23, 2026 07:33
timosachsenberg pushed a commit that referenced this pull request Jul 23, 2026
The comment claimed the returned map lists "every official TOPP tool
shipped with this OpenMS release", but #9784 made FeatureLinkerWNet's
registration conditional on WITH_WNETALIGN (mirroring the pre-existing
WITH_GUI guard for ExecutePipeline/ImageCreator), so the map depends on
build-time options. Reworded to reflect that.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017jjyuN9XkxRP73MJMo2jQK
timosachsenberg added a commit that referenced this pull request Jul 24, 2026
…ndler doxygen comment (#9789)

* docs(CHANGELOG): add entries for #9784, #9787

Backfill missing CHANGELOG entries: the ToolHandler FeatureLinkerWNet/
WITH_WNETALIGN guard fix (#9784, closes #9783) and the removal of the
broken check-tool-handler/check-authors-file pull_request_target
workflows (#9787, closes #9785).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017jjyuN9XkxRP73MJMo2jQK

* docs: fix stale ToolHandler::getTOPPToolList() doxygen comment

The comment claimed the returned map lists "every official TOPP tool
shipped with this OpenMS release", but #9784 made FeatureLinkerWNet's
registration conditional on WITH_WNETALIGN (mirroring the pre-existing
WITH_GUI guard for ExecutePipeline/ImageCreator), so the map depends on
build-time options. Reworded to reflect that.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017jjyuN9XkxRP73MJMo2jQK

* docs: fix getTOPPToolList() .ttd merge description (CodeRabbit)

The comment claimed external .ttd entries are "not merged here", but
getTOPPToolList() does merge internal .ttd-discovered tools in via
getInternalTools_() after the hard-coded registry, throwing on a name
collision. Caught by CodeRabbit review on PR #9789.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017jjyuN9XkxRP73MJMo2jQK

* docs: drop "official" from getTOPPToolList() @brief (CodeRabbit)

The @brief said it lists every "official" tool, contradicting the very
next sentence (and the class-level doc) which distinguishes official
hard-coded tools from internal .ttd-discovered ones that this method
also merges in.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017jjyuN9XkxRP73MJMo2jQK

---------

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.

ToolHandler lists FeatureLinkerWNet when WITH_WNETALIGN is disabled

2 participants