Skip to content

Build: Add vcpkg-configuration.json to establish registry baseline for reproducible builds - #8903

Closed
krrishverma1805-web wants to merge 2 commits into
OpenMS:developfrom
krrishverma1805-web:build/vcpkg-add-baseline
Closed

krrishverma1805-web wants to merge 2 commits into
OpenMS:developfrom
krrishverma1805-web:build/vcpkg-add-baseline

Conversation

@krrishverma1805-web

@krrishverma1805-web krrishverma1805-web commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

As part of my preparation for the GSoC 2026 Project B1 (Unify Development Dependencies Using vcpkg), I was auditing the current vcpkg integration in OpenMS.

I noticed that while vcpkg.json defines the dependencies, there is no vcpkg-configuration.json or builtin-baseline specified. Without a baseline, vcpkg pulls the absolute latest version of every dependency at the time of installation. This can lead to "works on my machine" issues, where two developers (or CI runners) end up with different versions of Boost or Qt simply because they ran vcpkg install on different days.

This PR introduces vcpkg-configuration.json to pin the default registry to a specific baseline commit. This ensures reproducible builds across the entire team and CI environments.

When updating dependencies in the future, maintainers simply bump the baseline hash.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file

Summary by CodeRabbit

  • Chores
    • Added a project-level configuration for C++ package management at the repository root. Establishes a default git-based package registry and a specific baseline revision to standardize dependency resolution. This change only affects dependency configuration and does not modify runtime behavior or user-facing features.

@coderabbitai

coderabbitai Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5324c377-a9eb-45dc-bd59-9b3b68bfbbf0

📥 Commits

Reviewing files that changed from the base of the PR and between 68abec2 and 9bec6c2.

📒 Files selected for processing (1)
  • vcpkg-configuration.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • vcpkg-configuration.json

📝 Walkthrough

Walkthrough

A new vcpkg-configuration.json file is added at the project root to configure the default package registry. It specifies a Git-based default registry referencing the official vcpkg repository and pins a baseline commit hash for versioning.

Changes

Cohort / File(s) Summary
Package Registry Configuration
vcpkg-configuration.json
Added new configuration file defining vcpkg default registry with kind "git", repository set to the official vcpkg URL, and a pinned baseline commit hash.

Poem

A rabbit hops with joy today,
A baseline set in tidy array,
Git registry now in place,
Packages find their steady space,
Hooray for builds that run the right way! 🐰

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding a vcpkg-configuration.json file to establish a baseline for reproducible builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vcpkg-configuration.json`:
- Line 5: The "baseline" value in vcpkg-configuration.json is set to a
nonexistent commit hash; update the baseline key to point to a valid commit SHA
from the microsoft/vcpkg repository. Locate the "baseline" entry in
vcpkg-configuration.json and replace "38a3560662d515a805f11dae6c2780b621e25e1a"
with a known-good commit hash (e.g., a recent commit on the microsoft/vcpkg main
branch) so vcpkg operations can resolve the baseline.
- Line 2: The $schema field in vcpkg-configuration.json is pointing to a 404
URL; update the "$schema" value to a valid accessible vcpkg configuration schema
(e.g., replace the current URL with the correct upstream schema such as
"https://raw.githubusercontent.com/microsoft/vcpkg/main/docs/spec/vcpkg-configuration.schema.json"
or the current schema URL from the official vcpkg repo), ensuring the "$schema"
property contains a working HTTP(S) URL that resolves.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75c56b45-64d8-4c94-bdce-ba01e32fd932

📥 Commits

Reviewing files that changed from the base of the PR and between 4c934ac and 68abec2.

📒 Files selected for processing (1)
  • vcpkg-configuration.json

Comment thread vcpkg-configuration.json Resolved
Comment thread vcpkg-configuration.json Resolved
- Introduces a default registry baseline to ensure reproducible builds.
- Prevents floating dependency versions when developers run vcpkg in manifest mode.
- Aligns with modern vcpkg enterprise best practices.
@jpfeuffer

Copy link
Copy Markdown
Contributor

Can you create a new CI workflow on your fork with which you test this whole endeavour?
Since no one uses it we cannot judge if what you are doing is correct.

@krrishverma1805-web

Copy link
Copy Markdown
Contributor Author

@jpfeuffer I have created a test workflow on my fork to validate this configuration.

✅ Validation Results: https://github.com/krrishverma1805-web/OpenMS/actions/runs/23117791599

The workflow successfully:

Validated the JSON syntax of vcpkg-configuration.json.
Verified the schema URL is accessible (HTTP 200).
Verified the baseline commit is valid and reachable in the official microsoft/vcpkg repository.
Performed a real installation test: Successfully resolved and installed a dependency (zlib) using this specific baseline configuration.
This confirms that the configuration file is correct and functional for reproducible builds.

@jpfeuffer

Copy link
Copy Markdown
Contributor

I meant a full build of OpenMS. The vcpkg submodule is outdated, the vcpkg.json is probably also outdated and too unspecific.
Unless you fix everything this does not make much sense unfortunately.

Maybe create a new repository with a GitHub packages nuget repository and binary cache to save time and prebuild the dependencies.
The problem is that Qt takes hours to build.

@jpfeuffer

Copy link
Copy Markdown
Contributor

@krrishverma1805-web

Copy link
Copy Markdown
Contributor Author

Thanks for the clarification that makes sense.
I agree that adding only a baseline file without validating a full OpenMS build via vcpkg is not sufficient yet, especially given the outdated vcpkg state and the cost of rebuilding dependencies like Qt.

I’ll treat this investigation as groundwork for a more complete vcpkg integration approach, including dependency updates, full-build validation, and binary caching strategy.

In that sense, this PR has been very helpful for understanding the current gaps, even if the final solution needs to be broader.

Copy link
Copy Markdown
Contributor

Adversarial review result: no blocking issue found. This only adds vcpkg-configuration.json, and I did not see source-comment tracker references.

No vcpkg configure/build run locally.

Copy link
Copy Markdown
Contributor

Thanks for the groundwork here, @krrishverma1805-web — closing as superseded, since develop has meanwhile grown a full vcpkg setup.

vcpkg-configuration.json now exists at the repo root, added in 0c21528 and refined in 164a78e / 089d70d. The current version pins a different baseline and also wires up the overlay ports/triplets that this PR predates:

{
  "default-registry": {
    "kind": "git",
    "baseline": "f9ffbaa46ad8e284b2b74919f7e0ba259564d424",
    "repository": "https://github.com/microsoft/vcpkg"
  },
  "overlay-ports": ["./vcpkg-overlays/ports"],
  "overlay-triplets": ["./vcpkg-overlays/triplets"]
}

Because of that, the PR is now in an add/add conflict on the same path, and merging it as-is would drop the overlay configuration.

The broader concerns @jpfeuffer raised (outdated vcpkg submodule, unspecific vcpkg.json, need for a full build and binary caching) were addressed in the follow-up work: #9800 (Windows/macOS vcpkg integration), #9928 (vcpkg dependency management guide), vcpkg in the main CI pipeline, and the cleanup PRs #9972, #10063 and #10112.

Your investigation was useful input into that direction — thanks, and you're very welcome to build on the current setup for the GSoC project.


Generated by Claude Code

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.

3 participants