Repository navigation
[BUILD,FIX] MassExplainer: include Compomer.h instead of forward-declaring it (MSVC 14.52) - #10950
Conversation
…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.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
Windows CI fails for PRs that get the new GitHub runner image
windows-2025-vs202620261116 (MSVC 14.52.37025):MassExplainer.hnamesstd::vector<Compomer>::const_iteratorand holds astd::vector<Compomer>member whileCompomeris only forward-declared. The standard allows instantiatingstd::vectorwith 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.hinstead of forward-declaringCompomer.Compomer.hdoesn't includeMassExplainer.h, so there is no include cycle. This is the same change as theMassExplainer.hpart 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.cppand their class tests compile. The Windows check of this PR is the real test.Summary by CodeRabbit