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

Add manifest-info.json to record manifest path in vcpkg_installed #1568

Merged
merged 11 commits into from
Jan 17, 2025

Conversation

JavierMatosD
Copy link
Contributor

@JavierMatosD JavierMatosD commented Jan 13, 2025

This PR introduces the generation of a manifest_info.json file in the vcpkg_installed directory for projects using a manifest (vcpkg.json). This file contains the absolute path to the manifest file that was used to generate the corresponding vcpkg_installed tree.

https://devdiv.visualstudio.com/DevDiv/_backlogs/backlog/Vcpkg%20Package%20Manager/Stories?System.AssignedTo=javiermat%40microsoft.com&System.State=Active%2CIn%20Progress%2CProposed%2CCommitted&workitem=2253211

@JavierMatosD JavierMatosD marked this pull request as draft January 13, 2025 18:20
@autoantwort
Copy link
Contributor

Is this for debugging purposes or is there a deeper reason?

@JavierMatosD
Copy link
Contributor Author

JavierMatosD commented Jan 13, 2025

Is this for debugging purposes or is there a deeper reason?

It was a requested feature to aid in debugging CG-related issues. This is just to be able to track which top level manifest owns which installed tree.

@BillyONeal
Copy link
Member

It was a requested feature to aid in debugging CG-related issues.

To clarify, CG is 'component governance'. I believe it's basically the same system as dependabot.

src/vcpkg/commands.set-installed.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.set-installed.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.set-installed.cpp Outdated Show resolved Hide resolved
@dg0yt
Copy link
Contributor

dg0yt commented Jan 13, 2025

Is a pure "manifest_info.json" enough, or will this eventually need to catch more configuration?

@JavierMatosD JavierMatosD changed the title Add manifest_info.json to record manifest path in vcpkg_installed Add manifest-info.json to record manifest path in vcpkg_installed Jan 13, 2025
@JavierMatosD
Copy link
Contributor Author

Is a pure "manifest_info.json" enough, or will this eventually need to catch more configuration?

Do you have something specific in mind?

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Needs:

  • Docs
  • (Probably) JSON schema?

@JavierMatosD JavierMatosD marked this pull request as ready for review January 13, 2025 20:57
@dg0yt
Copy link
Contributor

dg0yt commented Jan 14, 2025

Is a pure "manifest_info.json" enough, or will this eventually need to catch more configuration?

Do you have something specific in mind?

This PR adds one specific info file for one specific property of the build. I wonder how long it takes until someone notices that more details are needed, and how the current solution will be scaled up then.

Being able to locate the manifest is fine. But there is also a configuration file, and there might be options which modify dependency resolution, such as overlay ports, and the artifacts, such as overlay triplets.

@JavierMatosD
Copy link
Contributor Author

Being able to locate the manifest is fine. But there is also a configuration file, and there might be options which modify dependency resolution, such as overlay ports, and the artifacts, such as overlay triplets.

You’re right that this file could evolve to include more details, which is why we opted for the JSON format. For now, its primary purpose is to anchor systems like Dependabot, CG, and similar tools to the originating manifest.

@BillyONeal
Copy link
Member

Needs:

  • Docs
  • (Probably) JSON schema?

We discussed as a team today that we don't expect further evolution here. We'll add a JSON schema to more formalize the contract but no other docs.

@JavierMatosD Please add something like this to docs:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-manifest-info.schema.json",
  "type": "object",
  "properties": {
    "manifest-path": {
      "description": "Identifies the path of the vcpkg manifest file that produced this installed tree.",
      "type": "string"
    }
  },
  "additionalProperties": true,
  "required": [ "manifest-path" ]
}

@BillyONeal BillyONeal enabled auto-merge (squash) January 17, 2025 20:18
@BillyONeal BillyONeal merged commit 89ab1aa into microsoft:main Jan 17, 2025
6 checks passed
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.

5 participants