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

[vcpkg] Fix regression in error messages with registries/versioning #15709

Merged
merged 5 commits into from Jan 22, 2021

Conversation

ras0219
Copy link
Contributor

@ras0219 ras0219 commented Jan 17, 2021

With the versioning and registries PRs landing, a regression was introduced where syntax issues with builtin ports were no longer displayed.

Before:

PS C:\src\vcpkg> .\vcpkg.old.exe install simage --dry-run
Computing installation plan...
Error: while loading port `simage`: Port definition not found

After:

PS C:\src\vcpkg> .\vcpkg.new.exe install simage --dry-run
Computing installation plan...
Error: There are invalid fields in the control or manifest file of simage
The following fields were not expected:
    In CONTROL: ersion
This is the list of valid fields for CONTROL files (case-sensitive):

    Source
    Version
    Port-Version
    Description
    Maintainer
    Build-Depends
    Homepage
    Type
    Supports
    Default-Features

You may need to update the vcpkg binary; try running .\bootstrap-vcpkg.bat to update.

Error: There are missing fields in the control file of simage
The following fields were missing:
    In CONTROL: Version
Error: failed to load port from C:\src\vcpkg\ports\simage

In addition to fixing this regression, this PR cleans up a few layers of duplicate code or impedance mismatch between APIs (such as loading and parsing from disk the same files multiple times). Especially, this implements PathsPortfileProvider entirely in terms of the new providers.

@JackBoosY JackBoosY self-assigned this Jan 18, 2021
@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal This PR or Issue was filed by the vcpkg team. labels Jan 18, 2021
@ras0219-msft ras0219-msft merged commit 3b433e5 into microsoft:master Jan 22, 2021
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
…icrosoft#15709)

* [vcpkg] Fix regression in error messages with registries/versioning

* [vcpkg] Clean up redundant re-parsing with try_load_overlay_port

* [vcpkg] Deduplicate PathsPortfileProvider

* [vcpkg] Restore uses of Checks::exit_maybe_upgrade after merge
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/`) info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants