Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-existent port dependencies with version overrides cause no error output #36994

Closed
dforsten opened this issue Feb 27, 2024 · 4 comments
Closed
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@dforsten
Copy link

Describe the bug
When adding a bogus dependency in the vcpkg.json file including a version override like:

{
    "dependencies": [
        "non-existent-port"
    ],
    "overrides": [
        { "name": "non-existent-port", "version": "1.0.0", "port-version": 2 }
    ]
}

executing "vcpkg install" will not report any error and silently fail:

E:\branches_e\vcpkg_baseline_bug\bogus_official>vcpkg install
Fetching registry information from https://github.com/microsoft/vcpkg (HEAD)...

Environment

  • OS: Windows
  • Compiler: N/A
  • vcpkg: 2024-02-07-8a83681f921b10d86ae626fd833c253f4f8c355b

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest vcpkg as described at https://learn.microsoft.com/de-de/vcpkg/get_started/get-started?pivots=shell-cmd
  2. Add a non-existent port with version override as described above
  3. Run "vcpkg install"
  4. No error is reported

Expected behavior
Non-existent ports should be reported as error on install, even if it is a version override.

@MonicaLiu0311
Copy link
Contributor

This is my result:

PS G:\vcpkg> ./vcpkg install
warning: In the September 2023 release, the default triplet for vcpkg libraries changed from x86-windows to the detected host triplet (x64-windows). For the old behavior, add --triplet x86-windows . To suppress this message, add --triplet x64-windows .
non-existent-port does not exist

@dforsten
Copy link
Author

vcpkg actually crashes in this case.

I debugged the issue and submitted a pull request fixing the crash and properly reporting a descriptive error:
microsoft/vcpkg-tool#1357

@dforsten
Copy link
Author

Why this issue is categorized as "question" is not clear to me.
It is a straight crash of the application!

@MonicaLiu0311 MonicaLiu0311 added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed category:question This issue is a question labels Mar 1, 2024
@dforsten
Copy link
Author

dforsten commented Mar 8, 2024

The PR fixing this issue is now merged:
microsoft/vcpkg-tool#1357

@dforsten dforsten closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

2 participants