WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

new_local_repository is not generated in crates.bzl #568

@rahulchaphalkar

Description

@rahulchaphalkar

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

Metadata

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