Skip to content

Let cargo use libgit2 to retrieve the cargo package index #32

@mcdonnnj

Description

@mcdonnnj

💡 Summary

The default behavior for cargo is to use the libgit2 library for git operations. This includes retrieving the cargo package index from GitHub. We are currently overriding this behavior to use the git command-line interface instead.

Motivation and context

On non-x86 32-bit systems (linux/arm/v6, linux/arm/v7, and linux/ppc64le) cargo is failing during package index retrieval with the following error: no REF_DELTA found, cannot inject object; class=Indexer (15). This seems to source from libgit2 per this code. No error is observed when forcing cargo to use the git CLI instead. I am unsure if a newer version of libgit2 would resolve this issue but it is observed in the latest version available for the Docker image we are using as our base (python:3.10.5-alpin3.16).

Implementation notes

Test against newer versions of cargo when they become available to see if the following modification can be removed:

Acceptance criteria

  • Without changing the default behavior of cargo Docker images will successfully build on the mentioned platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions