Skip to content

Shallow sync of vcpkg breaks versioning #398

@nickpdemarco

Description

@nickpdemarco

See microsoft/vcpkg#25349

Because this image shallow-clones vcpkg, it's difficult to get versioning working. Specifically, any useful value of builtin-baseline will fail to sync, and packages will subsequently not be found.

I'm working towards a workaround on this, that looks something like:

  1. During image build, parse vcpkg.json with a tool like jq to extract the value of builtin-baseline hash.
  2. Derive the commit date of the hash with git show -s --format=%ci
  3. Sync the image's vcpkg repo with git fetch --shallow-since=<date>

This is the best I can think of - I don't love bringing in a dependency like jq, and it seems bizarre (although possibly intended) to manipulate the vcpkg repository during such a straightforward use case. I'd love to get any feedback on this approach and see if there's a simpler path forward.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions