bazelbuild / bazelbuild/rules_rust

cargo_build_script uses CARGO_MANIFEST_DIR ending in "/"

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

Description

Populating CARGO_MANIFEST_DIR in cargo_build_script will not clean the path like in rust.bzl and rustc.bzl.

https://github.com/bazelbuild/rules_rust/blob/478cef4038f2a006800c0bdd31736d4fee6cd1e5/rust/private/rustc.bzl#L908-L911

https://github.com/bazelbuild/rules_rust/blob/478cef4038f2a006800c0bdd31736d4fee6cd1e5/rust/private/rust.bzl#L461-L462

https://github.com/bazelbuild/rules_rust/blob/478cef4038f2a006800c0bdd31736d4fee6cd1e5/cargo/private/cargo_build_script.bzl#L328-L340

I think the `paths.normalize` should be used in all these cases.

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.