bazelbuild / bazelbuild/rules_rust

"Build is not hermetic" warning incorrect for monorepo crates outside of workspace

Open
#3,782 3 comments 0 reactions 0 assignees View on GitHub
crate-universe
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

I have a monorepo which vendors some rust crates, and my workspace Cargo.toml imports them like this:
```
[workspace.dependencies]
flatbuffers-tonic = { path = "third_party/foo_workspace/bar" }
```

This results in Bazel emitting:
```
DEBUG: /private/var/tmp/_bazel_user/2fe8fca154ecc4fd4bfcc2428eaf334c/external/rules_rust+/crate_universe/extensions.bzl:706:14: WARN: Build is not hermetic - path dependency pulling in crate at /Users/user/monorepo/third_party/foo_workspace/Cargo.toml is being used
```

It should be hermetic still, however, since this crate is in my monorepo.

This is perhaps caused by #3754 creating an absolute path in `rules_rust`'s view of things.

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.