Skip to content

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

@rejuvenile

Description

@rejuvenile

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.

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