bazelbuild / bazelbuild/rules_rust

`path` dependencies in `[patch.crates-io]` used in cargo_universe resolve relative paths incorrectly

Open
#1,905 1 comment 1 reaction 0 assignees View on GitHub
bug crate-universe needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

When using a crates_universe setup, a `Cargo.toml` includes

```
[patch.crates-io]
foo = { path = "../foo" }
```

This specifies that we should locate `foo` in the parent directory of the dir containing the `Cargo.toml` including this line.

rules_rust instead appears to treat this path as relative to some temporary directory (in `/tmp`, at least on linux) and complains about not finding a package at `/tmp/foo` when `cargo-bazel splice` is executed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.