Skip to content

new_local_repository is not generated in crates.bzl #568

Open

Description

My cargo.toml has a few dependencies which are satisfied by a local path instead of git url or crate.io, similar to below

abc = { path = "path/to/abc"}

when I run cargo raze, the generated crates.bzl looks similar to

maybe(
        http_archive,
        name = "abc__9_0_3",
        url = "",
        type = "tar.gz",
        build_file = Label("//bazel/cargo/abc/remote:BUILD.abc-9.0.3.bazel"),
    )

where it still has http_archive. I had assumed something like new_local_repository would be used with the supplied path.
The empty URL field creates issues down the road, like

"/home/oem/.cache/bazel/_bazel_oem/968da50c6a622da40e48702838fa463b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 66, column 13, in _get_all_urls
                fail("At least one of url and urls must be provided")
Error in fail: At least one of url and urls must be provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions