Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new_local_repository is not generated in crates.bzl #568

Open
rahulchaphalkar opened this issue Aug 21, 2023 · 0 comments
Open

new_local_repository is not generated in crates.bzl #568

rahulchaphalkar opened this issue Aug 21, 2023 · 0 comments

Comments

@rahulchaphalkar
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant