Skip to content

Update vcpkg ports to use a manifest json file instead of a CONTROL file.#2132

Merged
ahsonkhan merged 7 commits into
Azure:masterfrom
ahsonkhan:UpdatePorts
Apr 19, 2021
Merged

Update vcpkg ports to use a manifest json file instead of a CONTROL file.#2132
ahsonkhan merged 7 commits into
Azure:masterfrom
ahsonkhan:UpdatePorts

Conversation

@ahsonkhan

@ahsonkhan ahsonkhan commented Apr 16, 2021

Copy link
Copy Markdown
Contributor

This is step 1 of #2085

We have to also fix up some of the engsys scripts and release pipeline.

We are now using vcpkg.json instead of CONTROL files in the packages published to vcpkg:
microsoft/vcpkg#17142
microsoft/vcpkg#17143

https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/pr-review-checklist.md#c000013

cc @danieljurek, @antkmsft

@ahsonkhan ahsonkhan added the EngSys This issue is impacting the engineering system. label Apr 16, 2021
@ahsonkhan ahsonkhan added this to the [2021] May milestone Apr 16, 2021
@ahsonkhan ahsonkhan self-assigned this Apr 16, 2021
Comment on lines +1 to +3
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
#

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am wondering if we should remove these comment now, since the file is JSON, and JSON doesn't support comments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any json-parser which will fail because if this file header?
Are we auto-removing this with release-scripts anyway?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We remove them with scripts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is there any json-parser which will fail because if this file header?

Yes, if they ingest it directly. Many RFC-compliant json parsers trip up on this.

Are we auto-removing this with release-scripts anyway?

Yes.

#
{
"name": "azure-security-keyvault-common-cpp",
"version-string": "@AZ_LIBRARY_VERSION@",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is now a JSON string, so wrapped in quotes, where previously it was just:
Version: @AZ_LIBRARY_VERSION@


macro(az_vcpkg_export targetName macroNamePart dllImportExportHeaderPath)
# CONTROL file has an extra '#' in the comment section, because VcPkg can't handle an empty line at that position,
# The vcpkg.json file has an extra '#' in the comment section, because VcPkg can't handle an empty line at that position,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@antkmsft I don't think this holds true anymore, since we are not using a CONTROL file.

# and exit. Other steps will check SkipVcpkgUpdate to decide whether to move
# forward.
if (!(Get-ChildItem -Path "$SourceDirectory/port/CONTROL")) {
if (!(Get-ChildItem -Path "$SourceDirectory/port/vcpkg.json")) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@danieljurek, can you fork off this branch https://github.com/ahsonkhan/azure-sdk-for-cpp/tree/UpdatePorts to make the engsys fixes in the release pipeline, if we need to make any other fixes, and test it with the daily vcpkg test PR.

Let me know if you want me to keep this change in as part of this PR, or remove it.

@ahsonkhan

Copy link
Copy Markdown
Contributor Author

We are now using vcpkg.json instead of CONTROL files in the packages published to vcpkg:
microsoft/vcpkg#17142
microsoft/vcpkg#17143

https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/pr-review-checklist.md#c000013

@ahsonkhan ahsonkhan marked this pull request as ready for review April 16, 2021 21:14

@vhvb1989 vhvb1989 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome! thanks

#
{
"name": "azure-core-cpp",
"version-string": "@AZ_LIBRARY_VERSION@",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should be using version-semver.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? This is replaced by our tooling with the version string from version.hpp on release.

@ahsonkhan ahsonkhan merged commit d452e94 into Azure:master Apr 19, 2021
@ahsonkhan ahsonkhan deleted the UpdatePorts branch April 19, 2021 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants