Repository navigation
Vcpkg Windows and macOS Integration - #9800
Conversation
|
@pjones Could you please check this PR? |
pjones
left a comment
There was a problem hiding this comment.
Looks great! Only a few small changes to make.
|
Update: KISSFFT is no longer needed as a dependency by OpenMS. |
f83f10b to
00debb9
Compare
|
Update: Added overlay port of eol-bspline, isospec and glpk. eol-bspline: overlay port mirrors the existing vendored eol-bspline integration located in src/openms/extern. |
|
The upstream issue suggests -ansi instead. Why not use this? |
The reason of not using -ansi flag because it would be too big of a jump backwards to resolve regression, used C17 instead since it is good middle ground for solving the issue and not sacrificing some features which may be not in ANSI C. (I also refactor it in my test-branch to ensure consistency with vcpkg glpk portfile existing code, later will add it in this PR after testing) Yes glpk is disabled by default and in current vcpkg integration users need to pass two flags during configure step i.e., Other two approaches I could think are:
Current approach is the most manual but doesn't need to make changes to either CMakeLists.txt or CMakePresets.json. If user want to let say invoke two features(like glpk and onnxruntime) then they can add it like: |
|
OK sounds fine for now. |
…cpkg's onnxruntime header erro, overlay port of pylmcf,wnet and wnetalign
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR expands vcpkg support across Linux, macOS ARM64, and Windows. It adds CI and CMake presets, updates dependency discovery, and adds overlay ports for IsoSpec, eol-bspline, GLPK, ONNX Runtime, OpenTIMS, Thermo Bridge, and related libraries. ChangesCross-platform CI and presets
CMake dependency wiring
eol-bspline port and library
IsoSpec port and distribution engine
Additional dependency ports
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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: 19
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in (1)
1-21: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRemove the unused
IsoSpecConfig.cmake.intemplate.src/CMakeLists.txtdoes not configure it.install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...)generates the installed export file instead. The template contains unsubstituted placeholders and includes the nonexistentIsoSpecLibrary.cmake.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in` around lines 1 - 21, Remove the unused IsoSpecConfig.cmake.in template; do not modify the generated install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...) configuration in src/CMakeLists.txt.
🟡 Minor comments (7)
vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake-41-45 (1)
41-45: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick winPin the license download to its expected SHA512.
file(DOWNLOAD)stops on transfer errors whenSTATUSis omitted, but it accepts changed content. Usevcpkg_download_distfilewithSHA512and pass its returned path tovcpkg_install_copyright.🤖 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 `@vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake` around lines 41 - 45, Replace the file(DOWNLOAD) call in the openms-thermo-bridge port definition with vcpkg_download_distfile, specifying the expected SHA512 and preserving the pinned license URL; store its returned path and pass that path to vcpkg_install_copyright instead of the hard-coded temporary file.vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt-10-11 (1)
10-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCall
cmake_minimum_required()beforeproject().CMake requires
cmake_minimum_required()to run before the top-levelproject()call. In the current order CMake emits an author warning:cmake_minimum_required() should be called prior to this top-level project() call.The policy settings thatcmake_minimum_required()establishes also do not apply to theproject()call itself.Two further points:
- The project name is
eol-bsplines, with a trailings. The port, the package, and the target are all namedeol-bspline. Align the project name to avoid confusion in build output and in${PROJECT_NAME}-derived paths.project()withoutLANGUAGESenables bothCandCXX. This library contains only C++ sources. EnablingCmakes vcpkg require a working C compiler for every triplet that builds this port.🐛 Proposed fix
-project("eol-bsplines") -cmake_minimum_required(VERSION 3.15 FATAL_ERROR) +cmake_minimum_required(VERSION 3.15 FATAL_ERROR) +project(eol-bspline LANGUAGES CXX)🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 10 - 11, Update the top-level CMake declarations so cmake_minimum_required() appears before project(), rename the project to eol-bspline, and restrict project() to CXX only via its LANGUAGES setting.vcpkg-overlays/ports/eol-bspline/portfile.cmake-1-5 (1)
1-5: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winDeclare the port as static-only.
vcpkg.jsonalready declares both helper dependencies with"host": true. Becausesrc/CMakeLists.txtalways creates aSTATICtarget, addvcpkg_check_linkage(ONLY_STATIC_LIBRARY)to report and normalize dynamic-triplet requests.vcpkg_cmake_configurealready performs an out-of-source build, so no source copy is required.🤖 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 `@vcpkg-overlays/ports/eol-bspline/portfile.cmake` around lines 1 - 5, Update the portfile setup before vcpkg_cmake_configure to call vcpkg_check_linkage(ONLY_STATIC_LIBRARY), declaring the port static-only and normalizing dynamic-triplet requests. Keep the existing out-of-source configure flow and SOURCE_PATH unchanged.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp-436-448 (1)
436-448: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve
doubleprecision in the double specialization.Both sites narrow values that originate from
doublecalculations tofloat. This reduces the precision of the smoothing matrix before LU factorization.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L436-L448: usedoubleforb1,b2, andq.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L485-L493: usedoubleforpm,pn, andsum.🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp` around lines 436 - 448, Preserve double precision in the double-specialization calculations: update b1, b2, and q in the Q matrix accumulation block at vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 436-448 to double, and update pm, pn, and sum at lines 485-493 to double. No other changes are required.vcpkg-overlays/ports/isospec/src/CMakeLists.txt-10-11 (1)
10-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCall
cmake_minimum_required()beforeproject().CMake requires
cmake_minimum_required()to run first. In the current order, CMake reports a warning and applies default policy settings during theproject()call. Swap the two lines.🔧 Proposed fix
-project("IsoSpec") cmake_minimum_required(VERSION 3.15 FATAL_ERROR) +project("IsoSpec" LANGUAGES CXX)🤖 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 `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt` around lines 10 - 11, Swap the calls so cmake_minimum_required() executes before project("IsoSpec") in the CMake configuration.vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp-156-167 (1)
156-167: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winMap
mprotectto_mprotectinmman.h. The header declares only_mprotect, so callers of the POSIXmprotectAPI cannot compile, while the implementation remains unused. Add#define mprotect _mprotect.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp` around lines 156 - 167, Update mman.h to define the POSIX mprotect name as an alias of the existing _mprotect implementation, ensuring callers resolve to _mprotect without changing its behavior.vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp-1-8 (1)
1-8: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winAdd
tabulator.cppto theIsoSpecsource list.The current CMake source list omits this tracked file, so its explicit
Tabulatorinstantiations are not compiled. The header already provides the required member and generator definitions.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp` around lines 1 - 8, Add tabulator.cpp to the IsoSpec CMake source list so the explicit Tabulator<IsoThresholdGenerator> and Tabulator<IsoLayeredGenerator> instantiations in tabulator.cpp are compiled. Preserve the existing source-list structure and entries.
🧹 Nitpick comments (16)
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h (1)
105-119: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueNote the copy hazard on the raw
BSplineP<T> *smember.
BSplineownssthrough a raw pointer and deletes it in the destructor. The class declares no copy constructor and no copy assignment operator, and the base classBSplineBasedeclares a public copy constructor. A copy of aBSplinetherefore sharessand causes a double free.This is an upstream defect and not introduced by this PR. Do not patch the vendored source in place. If you want protection, add the fix as a port patch file so the change stays visible and revertable on the next upstream sync.
🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h` around lines 105 - 119, Add a separate vcpkg port patch for class BSpline to prevent unsafe copying of its owning raw BSplineP<T>* s member, by explicitly disabling or correctly implementing copy construction and copy assignment. Do not modify the vendored BSpline.h directly; register the patch through the port configuration so it remains visible and revertible.vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h (3)
99-102: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value
operator=has no self-assignment guard and frees memory it then reads.
operator=forwards toCopy(*this, b). For the expressionm = m,aandbare the same object. Line 133 executesdelete[] a.bands. Line 139 allocates a new array. Line 143 then readsb.bands[i], which points at the freed array. This is a use-after-free.The copy constructor is safe, because it sets
bands(0)before callingCopy.This is an upstream defect and not introduced by this PR. OpenMS does not appear to self-assign a
BandedMatrix, so the path is not reachable today. If you add a patch file for this port, include this guard.🛡️ Proposed patch content
BandedMatrix<T> & operator= (const BandedMatrix<T> &b) { + if (this == &b) + return *this; return Copy (*this, b); }Also applies to: 131-146
🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 99 - 102, Add a self-assignment check to BandedMatrix<T>::operator= before forwarding to Copy, returning the current object unchanged when this and b refer to the same instance; retain the existing Copy path for distinct objects.
359-371: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueThe back substitution divides by
A(M,M)without checking it for zero.Line 360 executes
b[M-1] /= A(M,M)unconditionally. The loop that follows checksA(i,i) == 0at line 363 and returns 1. The last diagonal element receives no such check. IfA(M,M)is zero, the result is an infinity or a NaN that propagates through the whole back substitution and into the spline coefficients, andLU_solve_bandedstill returns 0.
BSpline<T>::solvetreats a return value of 0 as success and setsOK = true, so the caller cannot detect the failure.
LU_factor_bandedrejects a zero pivot at line 299, which makes this unreachable for matrices produced byBSplineBase::factor. The gap only matters if a caller solves with a matrix that was not factored by that path.This is an upstream defect and not introduced by this PR.
🛡️ Proposed patch content
// Now for the backward substitution + if (A(M,M) == 0) + return 1; b[M-1] /= A(M,M);🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 359 - 371, Update the backward-substitution logic in LU_solve_banded to check A(M,M) for zero before dividing b[M-1]; return the same failure status used by the loop’s zero-diagonal check. Preserve the existing substitution flow for nonzero pivots so callers such as BSpline<T>::solve can detect the failure through the return value.
20-26: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winCarry the vendored-source fixes as port patch files. The port copies eol-bspline 1.5 sources directly into
vcpkg-overlays/ports/eol-bspline/src/, so every correction to upstream code is now an invisible edit to a copied tree. Four separate upstream defects need attention, and all four share this one root cause. Add apatcheslist to the portfile and keep each change as a discrete patch. The next upstream sync then shows exactly what OpenMS changed and why.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L20-L26: add#include <cassert>and#include <cstdlib>. Line 75 and line 92 callabs, and line 261 callsassert. Both resolve only through<iostream>today. Fix this one first, because it is the only defect in this group that can break the new Windows and macOS toolchains this PR targets.vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L99-L102: add aif (this == &b) return *this;guard tooperator=.Copyfreesa.bandsat line 133 and then readsb.bands[i]at line 143, which is a use-after-free when both refer to the same object.vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h#L359-L371: checkA(M,M)for zero before the division at line 360, and return 1 on zero. The loop below already performs this check for every other diagonal element.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h#L105-L119: delete or define the copy constructor and copy assignment operator.BSplineownsBSplineP<T> *sthrough a raw pointer andBSplineBaseexposes a public copy constructor, so a copy causes a double free.Only the first item is reachable in the current OpenMS call paths. Treat the other three as hardening.
🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h` around lines 20 - 26, Carry all four eol-bspline fixes as separate entries in a portfile patches list rather than editing the vendored sources directly: in vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h lines 20-26 add the required cassert and cstdlib includes; at lines 99-102 update operator= with a self-assignment guard; at lines 359-371 handle a zero A(M,M) diagonal by returning 1 before division; and in vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h lines 105-119 delete or properly define copying for the raw-pointer-owned BSpline state. Each file/site requires its corresponding discrete patch, with the first include fix prioritized and the remaining changes retained as hardening.vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt (2)
36-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
POSITION_INDEPENDENT_CODEinstead of a hardcoded-fPIC.The
if (NOT WIN32)guard covers MSVC, but it does not cover every non-GNU-style driver that CMake supports on Linux and macOS. CMake already knows the correct position-independent-code flag for each compiler and emits nothing where the flag does not apply.This matters for this port. OpenMS links
eol-bsplineas a static archive into a shared library, so the objects must be position independent on ELF and Mach-O targets.♻️ Proposed change
-# Apply compiler flags -if (NOT WIN32) - target_compile_options(eol-bspline PRIVATE -fPIC) -endif() +# Objects are linked into a shared library, so they must be position independent. +set_target_properties(eol-bspline PROPERTIES POSITION_INDEPENDENT_CODE ON)🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 36 - 38, Replace the hardcoded -fPIC target_compile_options block with CMake’s POSITION_INDEPENDENT_CODE property on the eol-bspline target, enabling it unconditionally so CMake selects the appropriate compiler behavior across supported platforms.
47-50: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winInstall the package version file.
The manifest declares version
2.2.0, but the port does not installeol-bsplineConfigVersion.cmake. Generate it withCMakePackageConfigHelpersandVERSION 2.2.0. If the export is renamed toeol-bsplineTargets.cmake, install a config wrapper that includes it. Keep the unnamespacedeol-bsplinetarget required by OpenMS.🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt` around lines 47 - 50, Update the CMake install configuration around eol-bsplineTargets to use CMakePackageConfigHelpers, generate and install eol-bsplineConfigVersion.cmake with VERSION 2.2.0, and install a config wrapper that includes the exported targets file if the export is renamed to eol-bsplineTargets.cmake. Preserve the required unnamespaced eol-bspline target.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox (1)
167-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe installation section contradicts the port layout.
Line 182 states that all
*.cppand*.hfiles inBSpline/must be copied into the include directory. The port does the opposite:src/CMakeLists.txtline 55 excludes*.cppfrom the install and compiles the templates into a static library throughBSplineLib.cpp.The section also describes SCons and MS Studio project files, and the
Tests/Datadirectory, thedriverprogram, and theplot-N.pngimages referenced elsewhere in this file. None of those exist in this overlay.This is upstream documentation carried over verbatim. Do not rewrite it. Add a short note at the top of the port directory, or in the port
usagefile, that states the packaged layout supersedes this section. That prevents a future maintainer from reading the*.cppexclusion inCMakeLists.txtas a defect.🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox` around lines 167 - 183, The port retains upstream installation documentation that conflicts with the packaged layout. Add a brief maintainer-facing note at the top of the port directory or in its usage documentation stating that the port’s CMake install rules and packaged layout supersede the upstream Installation section, including its references to copying .cpp files, SCons, MS Studio projects, tests, and plot assets; do not modify the upstream BSpline.dox text.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp (1)
87-90: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
BandAare two names for the same vector.Both references bind to
s->A. The code accumulates the right-hand side throughB, then solves in place throughA. The aliasing is deliberate, but the two names hide it.Do not change the vendored source. If you later maintain a patch for this port, a single name with a comment would make the in-place solve explicit.
🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp` around lines 87 - 90, Leave the vendored BSpline source unchanged. If maintaining a future port patch, replace the duplicate references in the surrounding solve logic with one vector name and add a comment documenting that the right-hand-side accumulation and in-place solve share s->A.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp (1)
31-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFormat both C++ sources to the repository standard.
The new sources use four-space indentation and omit braces for control-flow blocks.
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp#L31-L61: use two-space indentation and braces for every block.vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp#L22-L33: indent namespace contents by two spaces.As per coding guidelines, C++ files require two-space indentation, aligned braces on separate lines, and braces for every block.
🤖 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 `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp` around lines 31 - 61, Format vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 31-61 using two-space indentation, braces on separate aligned lines, and braces around every control-flow block in Matrix::operator+=; also indent namespace contents by two spaces in vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp lines 22-33.Source: Coding guidelines
vcpkg-overlays/ports/isospec/src/CMakeLists.txt (1)
73-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPrefer the
POSITION_INDEPENDENT_CODEproperty over a raw-fPICflag.The property is compiler independent and CMake applies the correct flag per toolchain. It also respects the vcpkg triplet setting.
♻️ Proposed refactor
-# Apply compiler flags -if (NOT WIN32) - target_compile_options(IsoSpec PRIVATE -fPIC) -endif() +# Allow linking the static archive into shared libraries. +set_target_properties(IsoSpec PROPERTIES POSITION_INDEPENDENT_CODE ON)🤖 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 `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt` around lines 73 - 76, Replace the platform-specific raw -fPIC option in the IsoSpec target configuration with CMake’s POSITION_INDEPENDENT_CODE target property. Apply it to the IsoSpec target so the toolchain and vcpkg triplet control the appropriate compiler behavior, and remove the surrounding WIN32 conditional.vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp (1)
18-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftFetch a pinned upstream IsoSpec revision.
portfile.cmakebuilds from${CURRENT_PORT_DIR}/src, and the 33 implementation files duplicatesrc/openms/extern/IsoSpec/IsoSpecbyte-for-byte. The manifest declares2.2.0, but upstream has no matching GitHub tag. Usevcpkg_from_github()with a real commit or release archive and its SHA, then patch the OpenMS CMake integration. If vendoring is required, document the exact upstream commit and local changes.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp` around lines 18 - 29, Update the IsoSpec port source acquisition in portfile.cmake to use vcpkg_from_github with a real pinned upstream commit or release archive and its SHA256, instead of relying on the duplicated local src tree. Adjust the OpenMS CMake integration to consume the fetched layout, and if local vendoring remains necessary, document the exact upstream commit and all local modifications.vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h (1)
28-130: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRecord the upstream IsoSpec version for these vendored sources. The overlay checks in verbatim upstream IsoSpec sources. These files use 4-space indentation and
){-style braces, which conflicts with the repository C++ guideline that requires 2-space indentation and braces on their own aligned lines. Do not reformat them. Reformatting vendored code makes every future upstream sync a manual merge. Instead, mark the directory as vendored and record the exact upstream commit or release tag it was copied from, so a later sync can diff against upstream.Two options, in order of preference:
- Fetch a pinned upstream archive in
portfile.cmakewithvcpkg_from_githuband apply local changes as patches. This removes the copied sources entirely.- If the sources must stay in-tree, add the upstream commit or tag to
vcpkg-overlays/ports/isospec/vcpkg.jsonor aREADME, and exclude the directory from repository formatting and lint checks.
vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h#L28-L130: keep the upstream formatting; do not apply the 2-space rule. Note that the forward declaration at line 136 declares::PrecalculatedMarginalat global scope, notIsoSpec::PrecalculatedMarginal. It is inert becauseOrderMarginalsBySizeDecresingis a template, so leave it unchanged and report it upstream.vcpkg-overlays/ports/isospec/src/IsoSpec/allocator.h#L26-L66: keep the brace-lessifat lines 54-55 as upstream wrote it; do not apply the always-brace rule to this vendored file.vcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.h#L25-L56: keep the upstream formatting; cover this file with the same vendored-directory exclusion.As per coding guidelines, C++ files must "use C++23 and format C++ with 2-space indentation ... and braces on their own aligned lines; always use braces for blocks". The guidelines also state "Never modify vendored code under
src/openms/extern/; use the provided synchronization scripts instead". These files sit undervcpkg-overlays/rather thansrc/openms/extern/, so the never-modify rule does not apply by path. Confirm which rule the maintainers intend for vendored overlay sources.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h` around lines 28 - 130, Record the exact upstream IsoSpec commit or release tag and treat these files as vendored rather than reformatting them. Prefer replacing copied sources with a pinned vcpkg_from_github archive and patches; otherwise document the version in vcpkg.json or README and exclude vcpkg-overlays/ports/isospec/src/IsoSpec from formatting and lint checks. In operators.h (lines 28-130), allocator.h (lines 26-66), and dirtyAllocator.h (lines 25-56), preserve upstream formatting, including the brace-less if and global PrecalculatedMarginal declaration, and report that declaration upstream; confirm with maintainers which vendored-overlay rule applies.Source: Coding guidelines
vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h (1)
60-65: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winRemove the unused
_mprotectshim.
No source calls_mprotectormprotect. Remove the declaration and definition instead of renaming the function.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h` around lines 60 - 65, Remove the unused _mprotect declaration from mman.h and delete its corresponding definition, without renaming it or adding a replacement mprotect shim; leave the other memory-mapping APIs unchanged.vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h (1)
17-51: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winInclude
platform.hinisoMath.hbefore evaluatingISOSPEC_BUILDING_OPENMS.The CMake target currently defines
ISOSPEC_BUILDING_OPENMS=true, so its sources use the 1024-entry table and bounds guard. Other translation units can still evaluate the macro beforeplatform.h, select the 10M table, and omit the guard. This can cause an out-of-bounds access tog_lfact_table.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h` around lines 17 - 51, Include platform.h at the top of isoMath.h before any evaluation of ISOSPEC_BUILDING_OPENMS, ensuring all translation units select the same factorial-table size and bounds-guard behavior.vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h (1)
31-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRestore the upstream default for direct header consumers. The installed
IsoSpecExport.hpath is correct, andIsoSpecis always static, so the compile and DLL-export concerns do not apply. Thetruedefault still applies OpenMS-specific factorial-table and size-check behavior to consumers that do not receive the target’sPUBLICdefinition. Keeptrueintarget_compile_definitions(IsoSpec PUBLIC ...)and restorefalseinplatform.h.🤖 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 `@vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h` around lines 31 - 33, In platform.h, change the fallback definition of ISOSPEC_BUILDING_OPENMS from true to false for direct header consumers. Leave the target_compile_definitions(IsoSpec PUBLIC ...) definition unchanged at true.vcpkg-overlays/ports/isospec/vcpkg.json (1)
1-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDeclare all bundled licenses and install their notices.
Use an SPDX expression such as
"BSD-2-Clause AND BSL-1.0 AND MIT AND LicenseRef-Public-Domain". Install the corresponding license notices in addition toIsoSpec/LICENSE.The vendored snapshot has no version marker that supports
2.2.0.🤖 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 `@vcpkg-overlays/ports/isospec/vcpkg.json` around lines 1 - 16, Update the vcpkg port metadata for isospec to use the supported upstream version marker rather than 2.2.0, declare the complete bundled-license SPDX expression covering BSD-2-Clause, BSL-1.0, MIT, and LicenseRef-Public-Domain, and install notices for each corresponding license in addition to IsoSpec/LICENSE.
🤖 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 `@CMakeLists.txt`:
- Around line 563-567: Update the ONNX Runtime dependency lookup in the
OPENMS_USE_VCPKG conditional so only the provider-specific find_package call in
the appropriate branch runs; remove any unconditional find_package(ONNXRuntime
REQUIRED) invocation while preserving the vcpkg onnxruntime CONFIG lookup.
In `@CMakePresets.json`:
- Line 116: Update the linux-arm64-ci preset to override WITH_THERMO_RAW to OFF,
preventing that preset from inheriting the global ON value; leave Thermo RAW
enabled only in platform presets that support its native dependencies.
- Line 110: In the CMake preset, replace the WITH_THERMORAWFILEPARSER_TEST
option with ENABLE_THERMO_RAW_TESTS and keep it enabled so CMakeLists.txt
fetches the Thermo RAW test data and ThermoRawFile_test runs its integration
path.
In `@src/openms/extern/CMakeLists.txt`:
- Around line 53-64: Remove the direct vendored changes from
src/openms/extern/CMakeLists.txt lines 53-64 and relocate the vcpkg SQLite
discovery and OPENMS_SQLITECPP_EXTRA_LIBS setup to maintained OpenMS CMake code.
For src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt lines 14-16, apply the
SQLite alias compatibility change through the SQLiteCpp synchronization source
or workflow instead of editing the vendored file.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp`:
- Around line 117-134: Remove or replace the debug stream statements that output
vector objects in the solve flow around LU_solve_banded, including B and A. Keep
supported BandedMatrix<T> diagnostics such as base->Q, but ensure BSpline<float>
and BSpline<double> no longer require an operator<< for std::vector<T>.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 599-601: Validate the computed interval count before assigning it
to M in the constructor or initialization path containing DX: reject any
M/num_nodes value below 4, including the automatic waveLength == 0 and NX == 1
path, before matrix construction or calculateQ(). Update the public parameter
documentation to require at least 4 intervals and adjust tests to cover
rejection of explicit values 2–4 and the automatic insufficient-interval case.
- Around line 135-145: Implement a deep-copy assignment operator for
BSplineBase<T>, copying all scalar and container state and cloning the owned
base object while safely handling self-assignment, or explicitly delete copy
assignment if assignment is unsupported. Keep copy behavior consistent with the
existing BSplineBase copy constructor and ensure raw-pointer ownership cannot be
shallow-copied.
- Around line 165-173: Update setDomain() to reset OK before validating inputs,
ensuring every invalid call leaves the object marked not ready. During a valid
reconfiguration, clear or invalidate base->Nodes before rebuilding the
domain-dependent state so nodes() cannot expose values from the previous domain
and remains consistent when M changes.
- Around line 542-552: Update the x-domain validation in the min/max scan before
the later DX calculation: after determining xmin and xmax, reject the spline
when xmin is not strictly less than xmax. Ensure the rejection marks
construction as invalid and prevents Alpha(), Basis(), or DBasis() from being
used with a zero-width domain.
In `@vcpkg-overlays/ports/isospec/portfile.cmake`:
- Around line 1-12: Declare the IsoSpec port as static-only by adding
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) before vcpkg_cmake_configure() in the
port configuration flow, ensuring vcpkg records the required linkage before
configuring the build.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/fasta.h`:
- Around line 17-20: Add a port patch for the installed public header fasta.h so
it directly includes the standard headers declaring memset and size_t, rather
than relying on cwrapper.cpp include order. Keep the fix scoped to making
IsoSpec/fasta.h self-contained and visible as an upstream overlay change.
- Around line 37-42: Update the lookup index in the FASTA-processing loop to
convert fasta[idx] to unsigned char before multiplying by 6 and indexing
aa_symbol_to_elem_counts. Preserve the existing atomCounts accumulation
behavior, and report the same fix upstream so this overlay patch can later be
removed.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.cpp`:
- Around line 172-183: Replace the `_confs` reordering loop in `sort_by_mass()`
with the same cycle-following permutation logic used by `reorder_array`. Copy
`inverse` privately, then walk each permutation cycle while applying the
corresponding row swaps to `_confs`; update the private permutation state so
every cycle terminates, while leaving the original `inverse` results unchanged.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/misc.cpp`:
- Line 28: Update the quickselect declarations in both mirrored misc.h files to
use void** array, matching the existing quickselect definition in misc.cpp. Keep
the function name and remaining parameters unchanged so the declaration and
definition refer to the same overload.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.h`:
- Around line 34-38: Update reallocate() and its callers to use size_t for
allocation byte counts, and preserve the original pointer when realloc fails by
assigning the result only after success. Widen allDimSizeOfInt and confs_tbl_idx
to size_t so the growth path and indexing calculations cannot overflow; apply
these changes consistently at the allocation and write sites.
In `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-builtin.patch`:
- Around line 1-34: Align the patch filename used by the onnxruntime port
definition with the actual patch file: update the PATCHES entry in the port
configuration to reference fix-clang-waitpkg-builtin.patch, or rename the file
to match the existing entry, ensuring both names are identical.
In `@vcpkg-overlays/ports/onnxruntime/portfile.cmake`:
- Around line 15-20: Update the PATCHES list in the ONNX Runtime portfile to
reference the existing fix-clang-waitpkg-builtin.patch filename instead of
fix-clang-waitpkg-and-tpause-builtin.patch, preserving the remaining patch
entries unchanged.
In `@vcpkg-overlays/ports/opentims/fix-static-sqlite-include.patch`:
- Around line 9-14: The static OpenTIMS target currently exposes SQLite headers
without propagating its link dependency. In
vcpkg-overlays/ports/opentims/fix-static-sqlite-include.patch lines 9-14, update
opentims_cpp to link SQLite::SQLite3 through its interface for static consumers
and ensure the installed package configuration finds SQLite3; in
vcpkg-overlays/ports/opentims/usage lines 3-4, document the required SQLite
package and link target for static triplets until transitive export is
available.
In `@vcpkg.json`:
- Line 59: Update the OpenSSL entry in the vcpkg.json overrides to a patched 3.0
release at or above 3.0.21 after verifying compatibility, or remove the override
so the registry resolves a supported version.
---
Outside diff comments:
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.in`:
- Around line 1-21: Remove the unused IsoSpecConfig.cmake.in template; do not
modify the generated install(EXPORT IsoSpecTargets FILE IsoSpecConfig.cmake ...)
configuration in src/CMakeLists.txt.
---
Minor comments:
In `@vcpkg-overlays/ports/eol-bspline/portfile.cmake`:
- Around line 1-5: Update the portfile setup before vcpkg_cmake_configure to
call vcpkg_check_linkage(ONLY_STATIC_LIBRARY), declaring the port static-only
and normalizing dynamic-triplet requests. Keep the existing out-of-source
configure flow and SOURCE_PATH unchanged.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 436-448: Preserve double precision in the double-specialization
calculations: update b1, b2, and q in the Q matrix accumulation block at
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 436-448 to
double, and update pm, pn, and sum at lines 485-493 to double. No other changes
are required.
In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt`:
- Around line 10-11: Update the top-level CMake declarations so
cmake_minimum_required() appears before project(), rename the project to
eol-bspline, and restrict project() to CXX only via its LANGUAGES setting.
In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt`:
- Around line 10-11: Swap the calls so cmake_minimum_required() executes before
project("IsoSpec") in the CMake configuration.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.cpp`:
- Around line 156-167: Update mman.h to define the POSIX mprotect name as an
alias of the existing _mprotect implementation, ensuring callers resolve to
_mprotect without changing its behavior.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cpp`:
- Around line 1-8: Add tabulator.cpp to the IsoSpec CMake source list so the
explicit Tabulator<IsoThresholdGenerator> and Tabulator<IsoLayeredGenerator>
instantiations in tabulator.cpp are compiled. Preserve the existing source-list
structure and entries.
In `@vcpkg-overlays/ports/openms-thermo-bridge/portfile.cmake`:
- Around line 41-45: Replace the file(DOWNLOAD) call in the openms-thermo-bridge
port definition with vcpkg_download_distfile, specifying the expected SHA512 and
preserving the pinned license URL; store its returned path and pass that path to
vcpkg_install_copyright instead of the hard-coded temporary file.
---
Nitpick comments:
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h`:
- Around line 99-102: Add a self-assignment check to BandedMatrix<T>::operator=
before forwarding to Copy, returning the current object unchanged when this and
b refer to the same instance; retain the existing Copy path for distinct
objects.
- Around line 359-371: Update the backward-substitution logic in LU_solve_banded
to check A(M,M) for zero before dividing b[M-1]; return the same failure status
used by the loop’s zero-diagonal check. Preserve the existing substitution flow
for nonzero pivots so callers such as BSpline<T>::solve can detect the failure
through the return value.
- Around line 20-26: Carry all four eol-bspline fixes as separate entries in a
portfile patches list rather than editing the vendored sources directly: in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.h lines 20-26 add the
required cassert and cstdlib includes; at lines 99-102 update operator= with a
self-assignment guard; at lines 359-371 handle a zero A(M,M) diagonal by
returning 1 before division; and in
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h lines 105-119 delete or
properly define copying for the raw-pointer-owned BSpline state. Each file/site
requires its corresponding discrete patch, with the first include fix
prioritized and the remaining changes retained as hardening.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cpp`:
- Around line 87-90: Leave the vendored BSpline source unchanged. If maintaining
a future port patch, replace the duplicate references in the surrounding solve
logic with one vector name and add a comment documenting that the
right-hand-side accumulation and in-place solve share s->A.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.dox`:
- Around line 167-183: The port retains upstream installation documentation that
conflicts with the packaged layout. Add a brief maintainer-facing note at the
top of the port directory or in its usage documentation stating that the port’s
CMake install rules and packaged layout supersede the upstream Installation
section, including its references to copying .cpp files, SCons, MS Studio
projects, tests, and plot assets; do not modify the upstream BSpline.dox text.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.h`:
- Around line 105-119: Add a separate vcpkg port patch for class BSpline to
prevent unsafe copying of its owning raw BSplineP<T>* s member, by explicitly
disabling or correctly implementing copy construction and copy assignment. Do
not modify the vendored BSpline.h directly; register the patch through the port
configuration so it remains visible and revertible.
In `@vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp`:
- Around line 31-61: Format
vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cpp lines 31-61 using
two-space indentation, braces on separate aligned lines, and braces around every
control-flow block in Matrix::operator+=; also indent namespace contents by two
spaces in vcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cpp lines
22-33.
In `@vcpkg-overlays/ports/eol-bspline/src/CMakeLists.txt`:
- Around line 36-38: Replace the hardcoded -fPIC target_compile_options block
with CMake’s POSITION_INDEPENDENT_CODE property on the eol-bspline target,
enabling it unconditionally so CMake selects the appropriate compiler behavior
across supported platforms.
- Around line 47-50: Update the CMake install configuration around
eol-bsplineTargets to use CMakePackageConfigHelpers, generate and install
eol-bsplineConfigVersion.cmake with VERSION 2.2.0, and install a config wrapper
that includes the exported targets file if the export is renamed to
eol-bsplineTargets.cmake. Preserve the required unnamespaced eol-bspline target.
In `@vcpkg-overlays/ports/isospec/src/CMakeLists.txt`:
- Around line 73-76: Replace the platform-specific raw -fPIC option in the
IsoSpec target configuration with CMake’s POSITION_INDEPENDENT_CODE target
property. Apply it to the IsoSpec target so the toolchain and vcpkg triplet
control the appropriate compiler behavior, and remove the surrounding WIN32
conditional.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cpp`:
- Around line 18-29: Update the IsoSpec port source acquisition in
portfile.cmake to use vcpkg_from_github with a real pinned upstream commit or
release archive and its SHA256, instead of relying on the duplicated local src
tree. Adjust the OpenMS CMake integration to consume the fetched layout, and if
local vendoring remains necessary, document the exact upstream commit and all
local modifications.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.h`:
- Around line 17-51: Include platform.h at the top of isoMath.h before any
evaluation of ISOSPEC_BUILDING_OPENMS, ensuring all translation units select the
same factorial-table size and bounds-guard behavior.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/mman.h`:
- Around line 60-65: Remove the unused _mprotect declaration from mman.h and
delete its corresponding definition, without renaming it or adding a replacement
mprotect shim; leave the other memory-mapping APIs unchanged.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/operators.h`:
- Around line 28-130: Record the exact upstream IsoSpec commit or release tag
and treat these files as vendored rather than reformatting them. Prefer
replacing copied sources with a pinned vcpkg_from_github archive and patches;
otherwise document the version in vcpkg.json or README and exclude
vcpkg-overlays/ports/isospec/src/IsoSpec from formatting and lint checks. In
operators.h (lines 28-130), allocator.h (lines 26-66), and dirtyAllocator.h
(lines 25-56), preserve upstream formatting, including the brace-less if and
global PrecalculatedMarginal declaration, and report that declaration upstream;
confirm with maintainers which vendored-overlay rule applies.
In `@vcpkg-overlays/ports/isospec/src/IsoSpec/platform.h`:
- Around line 31-33: In platform.h, change the fallback definition of
ISOSPEC_BUILDING_OPENMS from true to false for direct header consumers. Leave
the target_compile_definitions(IsoSpec PUBLIC ...) definition unchanged at true.
In `@vcpkg-overlays/ports/isospec/vcpkg.json`:
- Around line 1-16: Update the vcpkg port metadata for isospec to use the
supported upstream version marker rather than 2.2.0, declare the complete
bundled-license SPDX expression covering BSD-2-Clause, BSL-1.0, MIT, and
LicenseRef-Public-Domain, and install notices for each corresponding license in
addition to IsoSpec/LICENSE.
🪄 Autofix
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 Plus
Run ID: 04ee8220-c5e6-449c-a1a8-fb71a060aa75
📒 Files selected for processing (91)
.github/workflows/openms_vcpkg_ci.ymlCMakeLists.txtCMakePresets.jsoncmake/cmake_findExternalLibs.cmakesrc/openms/CMakeLists.txtsrc/openms/extern/CMakeLists.txtsrc/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txtsrc/tests/class_tests/openms/CMakeLists.txtvcpkg-overlays/ports/eol-bspline/portfile.cmakevcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.cppvcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.doxvcpkg-overlays/ports/eol-bspline/src/BSpline/BSpline.hvcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.cppvcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineBase.hvcpkg-overlays/ports/eol-bspline/src/BSpline/BSplineLib.cppvcpkg-overlays/ports/eol-bspline/src/BSpline/BandedMatrix.hvcpkg-overlays/ports/eol-bspline/src/CMakeLists.txtvcpkg-overlays/ports/eol-bspline/src/COPYRIGHTvcpkg-overlays/ports/eol-bspline/src/DOCUMENTATIONvcpkg-overlays/ports/eol-bspline/src/Doxyfilevcpkg-overlays/ports/eol-bspline/src/LICENSEvcpkg-overlays/ports/eol-bspline/src/READMEvcpkg-overlays/ports/eol-bspline/vcpkg.jsonvcpkg-overlays/ports/glpk/configure.ac.patchvcpkg-overlays/ports/glpk/glpk.pc.invcpkg-overlays/ports/glpk/portfile.cmakevcpkg-overlays/ports/glpk/vcpkg.jsonvcpkg-overlays/ports/isospec/portfile.cmakevcpkg-overlays/ports/isospec/src/CMakeLists.txtvcpkg-overlays/ports/isospec/src/IsoSpec/IsoSpecConfig.cmake.invcpkg-overlays/ports/isospec/src/IsoSpec/LICENSEvcpkg-overlays/ports/isospec/src/IsoSpec/allocator.cppvcpkg-overlays/ports/isospec/src/IsoSpec/allocator.hvcpkg-overlays/ports/isospec/src/IsoSpec/btrd.hvcpkg-overlays/ports/isospec/src/IsoSpec/conf.hvcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.cppvcpkg-overlays/ports/isospec/src/IsoSpec/cwrapper.hvcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.cppvcpkg-overlays/ports/isospec/src/IsoSpec/dirtyAllocator.hvcpkg-overlays/ports/isospec/src/IsoSpec/element_tables.cppvcpkg-overlays/ports/isospec/src/IsoSpec/element_tables.hvcpkg-overlays/ports/isospec/src/IsoSpec/fasta.cppvcpkg-overlays/ports/isospec/src/IsoSpec/fasta.hvcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.cppvcpkg-overlays/ports/isospec/src/IsoSpec/fixedEnvelopes.hvcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.cppvcpkg-overlays/ports/isospec/src/IsoSpec/isoMath.hvcpkg-overlays/ports/isospec/src/IsoSpec/isoSpec++.cppvcpkg-overlays/ports/isospec/src/IsoSpec/isoSpec++.hvcpkg-overlays/ports/isospec/src/IsoSpec/marginalTrek++.cppvcpkg-overlays/ports/isospec/src/IsoSpec/marginalTrek++.hvcpkg-overlays/ports/isospec/src/IsoSpec/misc.cppvcpkg-overlays/ports/isospec/src/IsoSpec/misc.hvcpkg-overlays/ports/isospec/src/IsoSpec/mman.cppvcpkg-overlays/ports/isospec/src/IsoSpec/mman.hvcpkg-overlays/ports/isospec/src/IsoSpec/operators.cppvcpkg-overlays/ports/isospec/src/IsoSpec/operators.hvcpkg-overlays/ports/isospec/src/IsoSpec/platform.hvcpkg-overlays/ports/isospec/src/IsoSpec/summator.hvcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.cppvcpkg-overlays/ports/isospec/src/IsoSpec/tabulator.hvcpkg-overlays/ports/isospec/src/IsoSpec/test.cppvcpkg-overlays/ports/isospec/src/IsoSpec/unity-build.cppvcpkg-overlays/ports/isospec/vcpkg.jsonvcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-builtin.patchvcpkg-overlays/ports/onnxruntime/fix-cmake-cuda.patchvcpkg-overlays/ports/onnxruntime/fix-cmake-mlas.patchvcpkg-overlays/ports/onnxruntime/fix-cmake.patchvcpkg-overlays/ports/onnxruntime/fix-missing-cstdint.patchvcpkg-overlays/ports/onnxruntime/portfile.cmakevcpkg-overlays/ports/onnxruntime/vcpkg.jsonvcpkg-overlays/ports/openms-thermo-bridge/portfile.cmakevcpkg-overlays/ports/openms-thermo-bridge/usagevcpkg-overlays/ports/openms-thermo-bridge/vcpkg-nethost-use.patchvcpkg-overlays/ports/openms-thermo-bridge/vcpkg.jsonvcpkg-overlays/ports/opentims/fix-static-sqlite-include.patchvcpkg-overlays/ports/opentims/portfile.cmakevcpkg-overlays/ports/opentims/usagevcpkg-overlays/ports/opentims/vcpkg.jsonvcpkg-overlays/ports/pylmcf/portfile.cmakevcpkg-overlays/ports/pylmcf/vcpkg.jsonvcpkg-overlays/ports/wnet/portfile.cmakevcpkg-overlays/ports/wnet/vcpkg.jsonvcpkg-overlays/ports/wnetalign/portfile.cmakevcpkg-overlays/ports/wnetalign/vcpkg.jsonvcpkg-overlays/triplets/arm64-linux-dynamic-vcrel.cmakevcpkg-overlays/triplets/arm64-osx-dynamic-sysroot-debug.cmakevcpkg-overlays/triplets/arm64-osx-dynamic-sysroot-vcrel.cmakevcpkg-overlays/triplets/arm64-osx-dynamic-sysroot.cmakevcpkg-overlays/triplets/x64-linux-dynamic-vcrel.cmakevcpkg.json
| #Declaring vcpkg's sqlite3 up front so consumers can prefer it, instead of relying on race condition. | ||
| if(OPENMS_USE_VCPKG) | ||
| find_package(unofficial-sqlite3 CONFIG QUIET GLOBAL) | ||
| endif() | ||
|
|
||
| #Needed when linking SQLiteCpp directly, its own sqlite3 dependency isn't always reliably propogated | ||
| #weak linkage on macOS and Linux. | ||
| set(OPENMS_SQLITECPP_EXTRA_LIBS "") | ||
| if(OPENMS_USE_VCPKG AND TARGET unofficial::sqlite3::sqlite3) | ||
| list(APPEND OPENMS_SQLITECPP_EXTRA_LIBS unofficial::sqlite3::sqlite3) | ||
| endif() | ||
| set(OPENMS_SQLITECPP_EXTRA_LIBS "${OPENMS_SQLITECPP_EXTRA_LIBS}" CACHE INTERNAL "") |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
Do not modify vendored files under src/openms/extern/.
Move this integration logic to maintained OpenMS CMake code, or apply it through the repository synchronization workflow. Direct edits can be overwritten when the vendored dependencies are synchronized.
src/openms/extern/CMakeLists.txt#L53-L64: move vcpkg SQLite target discovery andOPENMS_SQLITECPP_EXTRA_LIBSsetup outside the vendored directory.src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt#L14-L16: apply the SQLite alias compatibility change through the SQLiteCpp synchronization source instead of this vendored file.
As per coding guidelines, “Never modify vendored code under src/openms/extern/; use the provided synchronization scripts instead.”
📍 Affects 2 files
src/openms/extern/CMakeLists.txt#L53-L64(this comment)src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt#L14-L16
🤖 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/extern/CMakeLists.txt` around lines 53 - 64, Remove the direct
vendored changes from src/openms/extern/CMakeLists.txt lines 53-64 and relocate
the vcpkg SQLite discovery and OPENMS_SQLITECPP_EXTRA_LIBS setup to maintained
OpenMS CMake code. For src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt lines
14-16, apply the SQLite alias compatibility change through the SQLiteCpp
synchronization source or workflow instead of editing the vendored file.
Source: Coding guidelines
There was a problem hiding this comment.
I couldn't find a documented policy against editing src/openms/extern directly, no mention in contributing.md. There seems to be a sync script called sync-from-upstream.sh in src/openms/thirdparty/percolator directory. But checking the commit history of files under extern it seems they are historically directly edited(correct me if I am wrong). Happy to move forward with sync mechanism if it exists.
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '== Repository instruction and contributor documentation =='
fd -HI '^(AGENTS\.md|CONTRIBUTING(\.md)?|README(\.md)?)$' . \
-E .git -E build -E OpenMS-build \
-x sh -c 'echo "--- $1"; rg -ni -C2 "vendored|vendor|extern|sync-from-upstream|synchroni[sz]" "$1" || true' sh {}
echo
echo '== Synchronization scripts and references =='
fd -HI -t f 'sync-from-upstream\.sh|sync.*upstream|.*sync.*\.sh' . \
-E .git -E build -E OpenMS-build \
-x sh -c 'echo "--- $1"; sed -n "1,180p" "$1"' sh {} || true
rg -ni -C2 'sync-from-upstream|synchroni[sz].*(extern|SQLiteCpp)|SQLiteCpp.*synchroni[sz]' \
-g '!**/.git/**' -g '!**/build/**' -g '!**/OpenMS-build/**' .
echo
echo '== Commit history: affected files =='
git log --format='%h %ad %an %s' --date=short -n 30 -- src/openms/extern/CMakeLists.txt
echo '-- SQLiteCpp sqlite3 CMake --'
git log --format='%h %ad %an %s' --date=short -n 30 -- src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt
echo
echo '== Recent changed line provenance =='
git blame -L 53,64 -- src/openms/extern/CMakeLists.txt || true
git blame -L 14,16 -- src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt || trueLength of output: 22221
@castorNova2, you are correct on both points.
CONTRIBUTING.md does not document this restriction. Direct edits also exist in the history of both affected files. For example, commits a9f803be4 and 9f916c2ae changed src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt.
The restriction is in the repository-root AGENTS.md. It explicitly prohibits modifications under src/openms/extern/ and src/openms/thirdparty/.
I found only one synchronization workflow: src/openms/thirdparty/percolator/sync-from-upstream.sh. I found no SQLiteCpp synchronization script or documented SQLiteCpp synchronization workflow. Therefore, my original comment was too specific when it required use of an existing SQLiteCpp synchronization workflow.
The vcpkg-specific discovery and linkage setup should move to maintained OpenMS CMake code outside src/openms/extern/. For the SQLiteCpp alias change, this PR needs either an existing supported upstream-sync process or maintainer guidance for the intended exception. The current repository does not provide that process.
🧠 Learnings used
Learnt from: CR
Repo: OpenMS/OpenMS PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-07-25T10:39:44.005Z
Learning: Applies to src/openms/extern/** : Never modify vendored code under `src/openms/extern/`; use the provided synchronization scripts instead.
You are interacting with an AI system.
There was a problem hiding this comment.
so i will move the extern/CMakeLists.txt additions in cmake_findExternalLibs.cmake before opentims block. How about that?. and by this CMakeLists.txt is untouched.
And for changes extern/SQLiteCpp/sqlite3/CMakeLists.txt, this can't be moved that easily.
@jpfeuffer following up on this thread: AGENTS.md prohibits direct edits under src/openms/extern/, and there's no sync script for SQLiteCpp(unlike thirparty percolator which have some script). What left is a small guard is sqlite3 CMakeLists.txt which prevent a configure crash when opentims claims the name first. Coderrabbitai suggest direct edits are prohibited. Ok to keep this edit here or would you like to advise some mechanism?
There was a problem hiding this comment.
Ideally there is no CMake inside openms for dependencies at all!
This was just a mechanism because those libraries were not available easily.
Everything should be moved to vcpkg ports.
I am pretty sure SQLiteCpp exists already.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
Ideally there is no CMake inside openms for dependencies at all! This was just a mechanism because those libraries were not available easily. Everything should be moved to vcpkg ports. I am pretty sure SQLiteCpp exists already.
OK, happy to force USE_EXTERNAL_SQLITECPP=ON under OPENMS_USE_VCPKG so bundled extern sqlite and alias collision issue is bypassed entirely.
Would you like me to want other extern deps like eol-bspline,isospec, nlohmann-json and simde move to same mechanism?
Also I think the alias collision will still occur in non-vcpkg build between system sqlite3 and bundled sqlite3 without the guard in src/openms/extern/SQLiteCpp/sqlite3/CMakeLists.txt at line 14?
There was a problem hiding this comment.
🧹 Nitpick comments (1)
vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch (1)
10-16: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winPreserve TPAUSE on Clang Linux.
Set
has_tpause_fromdata[2] & (1 << 5)for Clang. Then call_tpause()under the WAITPKG feature guard. The current code forces eligible Clang/Linux Intel builds to use_mm_pause()even when WAITPKG is available.🤖 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 `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch` around lines 10 - 16, Update the Clang branch that initializes has_tpause_ to derive support from data[2] & (1 << 5) instead of forcing false. In the WAITPKG feature-guarded path, invoke _tpause() when has_tpause_ is true, preserving _mm_pause() only as the fallback when TPAUSE is unavailable.Source: MCP tools
🤖 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.
Nitpick comments:
In `@vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch`:
- Around line 10-16: Update the Clang branch that initializes has_tpause_ to
derive support from data[2] & (1 << 5) instead of forcing false. In the WAITPKG
feature-guarded path, invoke _tpause() when has_tpause_ is true, preserving
_mm_pause() only as the fallback when TPAUSE is unavailable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 26954848-5420-4c28-afbb-11bfa5557ea4
📒 Files selected for processing (1)
vcpkg-overlays/ports/onnxruntime/fix-clang-waitpkg-and-tpause-builtin.patch
|
Good Progress but please check the code rabbit comments. |
|
@pjones Could you please check this PR? Everything is for review except src directory in eol-bspline and isospec overlay port(since they are just idential as their vendored library) but CMakeLists of both of them under src directory is changed for overlay port so included for review, onnxruntime overlay port is same as upstream vcpkg port except "fix-clang-waitpkg-and-tpause-builtin.patch", and glpk ovelay port is also same as upstream vcpkg port except line 47 in portfile.cmake which sets C17 as C standard. |
I wonder if overlay ports can just be diffs to upstream ports? Sounds tedious to keep full copies in sync. |
|
Update:
|
From what I understand overlay port act as a drop-in replacement for an existing port or as a new port. While resolving package names, overlay ports take priority which means it must have its own portfile.cmake and vcpkg.json atleast and is a self contained copy independent to any upstream equivalent port and vcpkg ignores upstream version entirely when overlay is present. So vcpkg natively doesn't support any diffs to upstream ports. How about a workaround where we can have a shell script which: reads openms's vcpkg pinned baseline, fetch upstream port, apply a patch(i.e., the minor change for which we create glpk overlay port) and write the resulting files to |
6097485 to
f2799ad
Compare
5326892 to
21e59f0
Compare
|
Update: Changed source of eol-bspline and isospec from overlay port directory itself to extern. Some trade-off of this approach:
But despite the trade-offs, the benefits outweigh them. |
d2a0cb2 to
352cdc4
Compare
Description
Extends the vcpkg intregation to Windows and macOS platforms. New additions are: respective platforms presets are added in CmakePresets.json file and also their compatibility code for integration, overlay ports of onnxruntime, openms-thermo-bridge and opentims, overlay triplets for macos, and different configuration triplets for linux.
Additions:
-isysrootto port builds which was causing build failure. Setting it explicitly tomacosxensures that issue resolves.releaseport build only, effectively halving the configure time by half (for e.g. below 2nd CI run of linux x64 gcc reduces the configure time from around 38 min to around 20 min)Platform Coverage:
Note: The above runs belong to my fork's
vcpkg-test-branchand its CI file. The Vcpkg CI file in this PR is a streamlined version of that since thevcpkg-test-branchCI file has multiple debugging and explicit steps.Remaining Tasks:
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
New Features
Bug Fixes
Documentation