Skip to content

[BUILD,FIX] MassExplainer: include Compomer.h instead of forward-declaring it (MSVC 14.52) - #10950

Merged
timosachsenberg merged 1 commit into
OpenMS:developfrom
timosachsenberg:fix/massexplainer-msvc
Nov 19, 2026
Merged

timosachsenberg merged 1 commit into
OpenMS:developfrom
timosachsenberg:fix/massexplainer-msvc

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Windows CI fails for PRs that get the new GitHub runner image windows-2025-vs2026 20261116 (MSVC 14.52.37025):

src/openms/source/DATASTRUCTURES/MassExplainer.cpp
MSVC\14.52.37025\include\vector(750): error C2036: 'OpenMS::Compomer *const ': unknown size
MSVC\14.52.37025\include\xmemory(746): error C2027: use of undefined type 'OpenMS::Compomer'
  MassExplainer.h(47): see reference to class template instantiation 'std::vector<OpenMS::Compomer,...>' being compiled
  MassExplainer.h(20): see declaration of 'OpenMS::Compomer'

MassExplainer.h names std::vector<Compomer>::const_iterator and holds a std::vector<Compomer> member while Compomer is only forward-declared. The standard allows instantiating std::vector with an incomplete type, but not referencing its members before the type is complete, and MSVC 14.52 now rejects it. The same develop commit (b4234c4) still builds on the older image 20261103 (MSVC 14.51), e.g. in #10948. Seen so far in #10949 and #10893.

The fix includes Compomer.h instead of forward-declaring Compomer. Compomer.h doesn't include MassExplainer.h, so there is no include cycle. This is the same change as the MassExplainer.h part of #10927, split out so develop builds on Windows again without waiting for that PR.

Checked locally with GCC: MassExplainer.cpp, FeatureDeconvolution.cpp, MetaboliteFeatureDeconvolution.cpp, ILPDCWrapper.cpp and their class tests compile. The Windows check of this PR is the real test.

Summary by CodeRabbit

  • Refactor
    • This update contains internal maintenance only. It does not change application features, workflows, or externally visible behavior. Existing functionality remains unchanged, and no action is needed. There are no new features, bug fixes, or user-facing changes to report in this release.

…aring it

MassExplainer.h names std::vector<Compomer>::const_iterator and holds a std::vector<Compomer> member while Compomer
is only forward-declared. The standard allows instantiating std::vector with an incomplete type, but not referencing its
members before the type is complete. MSVC 14.52 (GitHub runner image windows-2025-vs2026 20261116) now rejects this,
so MassExplainer.cpp fails to compile on Windows CI for every PR (C2027 / C2036 "use of undefined type
'OpenMS::Compomer'").

Same change as in OpenMS#10927, split out so develop builds on Windows again.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MassExplainer.h now includes Compomer.h directly. The header no longer contains a forward declaration for Compomer.

Changes: MassExplainer header update

Layer / File(s) Summary
Direct Compomer include
src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.h
The header includes Compomer.h directly and removes the Compomer forward declaration.

Suggested reviewers: cbielow, poshul

Change: Bug fix

Merge Risk: Minimal · up to fa1b9

This change adds a direct header include so that Windows builds with the newer MSVC toolchain can compile MassExplainer.h. No behavior change or concrete merge risk was identified. The Windows CI result is the remaining confirmation.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: MassExplainer.h now includes Compomer.h instead of forward-declaring it, which fixes a compile failure with MSVC 14.52. The header change in the summary matches this. …
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.
Full details: Title check

Explanation

The title names the main change: MassExplainer.h now includes Compomer.h instead of forward-declaring it, which fixes a compile failure with MSVC 14.52. The header change in the summary matches this. The [BUILD,FIX] tag and the compiler version add useful context, and the title is specific enough for a teammate scanning history to understand the primary change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the header line,
Compomer’s definition joins the file.
The forward note hops out of sight,
One direct include now sits in place.
The rabbit rests beside the code.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8bbd0d3-9a08-4dd6-a949-d063bdda23bc
Commits

Reviewing files that changed from the base of the PR and between b4234c4 and fa1b9a2.

Files selected for processing: 1

  • src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.h

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

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