Dependency graph submission failed
Nobody has claimed this yet.
- Dominant language
- CMake
- Stars
- 27.5k
- Forks
- 7.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 321
Description
Describe the bug
Dependency graph submission failed
Environment
- OS: [Windows]
- Compiler: Visual Studio 17 2022
To Reproduce
Steps to reproduce the behavior:
- ./vcpkg install --dry-run --debug
- Dependency graph submission failed
Repro code when
Hello,
I am encountering an issue while using the VCPKG_FEATURE_FLAGS flag in a basic CMake project that only uses the fmt library. My goal is to populate the GitHub dependency graph, following the official documentation: GitHub Integration with vcpkg.
Here is the GitHub Actions workflow I am using:
name: C/C++ CI
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
VCPKG_FEATURE_FLAGS: dependencygraph
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: bootstrap vcpkg
run: ${{ github.workspace }}/submodules/vcpkg//bootstrap-vcpkg.bat
# This will execute a dry-run, meaning that libraries will not be built and
# installed, but they will still be reported to the GitHub dependency graph.
# This step assumes `vcpkg` has been bootstrapped (run `./vcpkg/bootstrap-vcpkg`)
- name: Run vcpkg
run: ${{ github.workspace }}/submodules/vcpkg/vcpkg install --dry-run --debug
When the workflow runs, no errors are reported, but the logs show the message: "Dependency graph submission failed" (logs are attached to this issue).
From what I understand, curl is used to submit a JSON-formatted string to the GitHub submission API. Here is an example of the JSON structure generated by vcpkg:
{
"job": {
"id": "19406372881",
"correlator": "C/C++ CI-19406372881"
},
"version": 0,
"sha": "d353033e526171a46ccf51f174c308935bb5f630",
"ref": "refs/heads/main",
"scanned": "2025-11-16T13:31:12Z",
"detector": {
"name": "vcpkg",
"url": "https://github.com/microsoft/vcpkg",
"version": "1.0.0"
},
"manifests": {
"vcpkg.json": {
"name": "vcpkg.json",
"resolved": {
"pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23": {
"package_url": "pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23",
"relationship": "direct",
"dependencies": []
},
"pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23": {
"package_url": "pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23",
"relationship": "direct",
"dependencies": []
},
"pkg:github/vcpkg/fmt:x64-windows@12.1.0": {
"package_url": "pkg:github/vcpkg/fmt:x64-windows@12.1.0",
"relationship": "direct",
"dependencies": [
"pkg:github/vcpkg/vcpkg-cmake:x64-windows@2024-04-23",
"pkg:github/vcpkg/vcpkg-cmake-config:x64-windows@2024-05-23"
]
}
}
}
}
}
The URL used by vcpkg is: https://github.com/api/v3/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots. I tried submitting the request manually using the corrected URL (https://api.github.com/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots) and the same JSON string, with the following command:
curl -v -X POST \
-H "Authorization: Bearer <my token>" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/CruvixDev/vcpkg_test/dependency-graph/snapshots \
-d '{"job":{"id":"123","correlator":"test"},"version":0,"sha":"d353033e526171a46ccf51f174c308935bb5f630","ref":"refs/heads/main","scanned":"2025-11-16T13:31:12Z","detector":{"name":"vcpkg","url":"https://github.com/microsoft/vcpkg","version":"1.0.0"},"manifests":{"vcpkg.json":{"name":"vcpkg.json","resolved":{"pkg:github/vcpkg/fmt:x64-windows@12.1.0":{"package_url":"pkg:github/vcpkg/fmt:x64-windows@12.1.0","relationship":"direct","dependencies":[]}}}}'
This command works as expected and produces the correct result, as shown below:
I created the project following this official tutorial: Get started with vcpkg in VS Code.
I am wondering if this issue is due to an error on my part or if it is a bug related to the URL used by vcpkg for submitting data to the GitHub API.
Have you encountered this issue before, or do you have any suggestions on how to resolve it?
Thank you in advance for your help.
Best regards,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GitHub Actions workflow, VCPKG_FEATURE_FLAGS=dependencygraph, and the dependency-graph submission invoked by vcpkg install --dry-run --debug. Compare the URL logged by vcpkg with the working curl request and inspect the attached build log; done means the workflow submits the dependency snapshot without reporting failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, github-actions
- Domain
- build-system, ci-cd, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100