Skip to content

Conversation

@ashi009
Copy link

@ashi009 ashi009 commented Oct 22, 2025

This PR fixes issue #3247 by normalizing the CARGO_MANIFEST_DIR path in cargo_build_script to ensure it doesn't end with trailing slashes.

The issue occurs because CARGO_MANIFEST_DIR in cargo_build_script doesn't clean the path like in rust.bzl and rustc.bzl, leading to inconsistent paths that can cause problems for build scripts.

Fixes #3247

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Normalizing seems good but I'm still curious what the impact is. Also, this method of normalization seems funny, I would agree something like paths.normalize might make more sense but it also sounded like the issue was just a missing .rstrip("/")?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo_build_script uses CARGO_MANIFEST_DIR ending in "/"

2 participants