rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Some vendored crates get absolute paths in `MODULE.bazel.lock`

Open rejuvenile opened this issue 3 weeks ago • 1 comments

In my Cargo.toml, I have:

[workspace.dependencies]
...
flatbuffers-tonic = { path = "third_party/flatbuffers-tonic/flatbuffers-tonic" }
flatbuffers-tonic-build = { path = "third_party/flatbuffers-tonic/flatbuffers-tonic-build" }
flatbuffers-util = { path = "third_party/flatbuffers-tonic/flatbuffers-util" }
...

When these crates find their way into MODULE.bazel.lock, they are prefixed with absolute paths. This brakes cross-machine and cross-platform builds of these crates.

rejuvenile avatar Dec 02 '25 05:12 rejuvenile

A snippet from MODULE.bazel.lock:

          "crates__flatbuffers-util-0.1.2": {
            "repoRuleId": "@@rules_rust+//crate_universe/private:local_crate_mirror.bzl%local_crate_mirror",
            "attributes": {
...
              "path": "/Users/user/monorepo/third_party/flatbuffers-tonic/flatbuffers-util"
            }
          },

rejuvenile avatar Dec 02 '25 05:12 rejuvenile