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 doesn't generate valid manifests and configuration files. #5697

Open
WoLfulus opened this issue Oct 9, 2024 · 1 comment
Open

vcpkg doesn't generate valid manifests and configuration files. #5697

WoLfulus opened this issue Oct 9, 2024 · 1 comment
Labels

Comments

@WoLfulus
Copy link

WoLfulus commented Oct 9, 2024

Xmake Version

v2.9.5+HEAD.d30de52e9

Operating System Version and Architecture

Windows 11

Describe Bug

xmake doesn't create valid stub vcpkg.json and vcpkg-configuration.json files, which doesn't make integration seamless.
I often have to manually edit and/or modify vcpkg installation to make it work with calls made from xmake.

looking at the code, it doesn't seem to follow vcpkg schemas

vcpkg.schema.json

vcpkg-configuration.schema.json

for example, I'm unable to set "default-registry" value.

it would be nice to support those files out of the box, or at least provide a way to provide custom settings for both of them

Expected Behavior

I'd like to be able to more precisely control the output of both vcpkg.json and vcpkg-configuration.json because of the registries and overlays.

For example, a project I use vcpkg as a manifest provides "default-registry" key for configuration file, and it isn't supported by xmake.

Project Configuration

function vcpkg(name, configs)
  if not configs then
    configs = {}
  end

  -- Must match a release commit from https://github.com/microsoft/vcpkg/
  local baseline = "511d74f695bd45959d12b50b00f1b68f69e8f0b0"

  configs["baseline"] = baseline

  -- Will cause trouble
  -- configs["default_registries"] = {
  --   kind = "git",
  --   baseline = baseline,
  --   repository = "https://github.com/microsoft/vcpkg"
  -- }

  configs["registries"] = {
    {
      kind = "artifact",
      location = "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
      name = "microsoft"
    }
  }

  add_requires("vcpkg::" .. name, {
    alias = name,
    configs = configs,
  })
end

vcpkg("asio")

-- ...

Additional Information and Error Logs

warning: configuration contains the following unrecognized fields:
$.default-registriesIf these are documented fields that should be recognized try updating the vcpkg tool.
@WoLfulus WoLfulus added the bug label Oct 9, 2024
@waruqi
Copy link
Member

waruqi commented Oct 11, 2024

Therefore, use packages from the xmake-repo repository as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants