Skip to content

unsupported source protocol: sparse for key package.source #78

Description

@g0hl1n

Hi,
cargo-bitbake fails to parse Cargo files containing custom sparse registries:

$ cargo bitbake
error: failed to parse lock file at: /path/to/Cargo.lock

Caused by:
  unsupported source protocol: sparse for key `package.source`

Reproduction

An example Cargo.toml entry:

[dependencies]
foo = { version = "0.1.0", registry = "crates-dev-local" }

Which results in following Cargo.lock entry:

[[package]]
name = "foo"
version = "0.1.0"
source = "sparse+https://foo.jfrog.io/artifactory/api/cargo/crates-dev-local/index/"
checksum = "9228e13a0986a6ba12804284ae0ab68ad56f55f465338f99ab2ad44f5a7eec34"

Expected behavior

I would expect cargo-bitbake to translate this custom registry dependency to (the actual path must be retreived from the registry config):

SRC_URI += " \
  crate://foo.jfrog.io/artifactory/api/cargo/crates-dev-local/v1/crates/foo/0.1.0 \
"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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