Skip to content

Plumb DiagnosticContext into ToolCache / download / caching.#1842

Merged
BillyONeal merged 9 commits into
microsoft:mainfrom
BillyONeal:fetch-audit
Dec 9, 2025
Merged

Plumb DiagnosticContext into ToolCache / download / caching.#1842
BillyONeal merged 9 commits into
microsoft:mainfrom
BillyONeal:fetch-audit

Conversation

@BillyONeal

Copy link
Copy Markdown
Member

Unblocks microsoft/vcpkg#43309 by making vcpkg fetch --x-stderr-status actually work.

…cture.

Unblocks microsoft/vcpkg#43309 by making --x-stderr-status actually work to `vcpkg fetch`
Comment thread src/vcpkg/tools.cpp Outdated
Comment thread src/vcpkg/tools.cpp Outdated
Comment thread include/vcpkg/base/fwd/diagnostics.h
@MahmoudGSaleh MahmoudGSaleh requested review from MahmoudGSaleh and removed request for MahmoudGSaleh November 17, 2025 22:21
Comment thread src/vcpkg/tools.cpp Outdated
@BillyONeal BillyONeal enabled auto-merge (squash) December 9, 2025 01:49
@BillyONeal BillyONeal merged commit c86172d into microsoft:main Dec 9, 2025
7 checks passed
@BillyONeal BillyONeal deleted the fetch-audit branch December 12, 2025 23:33
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Mar 3, 2026
In microsoft#1842 I broke portsdiff and z-changelog because the previous behavior checked only if git cat-file -t succeeded, not whether the target was actually a commit. By "fixing" that to actually check for commit that breaks tag inputs.

Using -e and ^{commit} was suggested by gpt-5.3-codex but it was unable to make the other changes.

Demonstration:

```console
PS C:\Dev\vcpkg> .\vcpkg.exe z-changelog 2026.01.16
error: Invalid commit id: 2026.01.16
PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog bogus
error: Invalid commit id: bogus
note: "C:\Program Files\Git\cmd\git.exe" -C "C:\Dev\vcpkg" -c core.autocrlf=false cat-file -e "bogus^{commit}" failed with exit code 128
fatal: Not a valid object name bogus^{commit}

PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog 2026.01.16
#### Total port count: 2765
#### Total port count per triplet (tested): LINK
.
.
.
```
BillyONeal added a commit that referenced this pull request Mar 4, 2026
In #1842 I broke portsdiff and z-changelog because the previous behavior checked only if git cat-file -t succeeded, not whether the target was actually a commit. By "fixing" that to actually check for commit that breaks tag inputs.

Using -e and ^{commit} was suggested by gpt-5.3-codex but it was unable to make the other changes.

Demonstration:

```console
PS C:\Dev\vcpkg> .\vcpkg.exe z-changelog 2026.01.16
error: Invalid commit id: 2026.01.16
PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog bogus
error: Invalid commit id: bogus
note: "C:\Program Files\Git\cmd\git.exe" -C "C:\Dev\vcpkg" -c core.autocrlf=false cat-file -e "bogus^{commit}" failed with exit code 128
fatal: Not a valid object name bogus^{commit}

PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog 2026.01.16
#### Total port count: 2765
#### Total port count per triplet (tested): LINK
.
.
.
```
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.

2 participants