Skip to content

Fix Windows CRLF Issue #3455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timbess
Copy link

@timbess timbess commented May 27, 2025

Cargo configs are injected as a literal string which, on Windows, can end up with escaped CRLF line endings in cargo-bazel.json causing the digests to be different on Linux/Windows. This PR parses the inner string literal to prevent platform specific differences in the config.toml. There might be a better way to do this, but adding a new top level command to cargo-bazel to parse TOML into JSON felt wrong, and adding a second binary seems even worse. I'm open to solving this another way if ya'll have a better idea.

Copy link

google-cla bot commented May 27, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Cargo configs are injected as a literal string which, on Windows, can
end up with escaped CRLF line endings in cargo-bazel.json causing the
digests to be different on mac/windows. This parses the inner string
literal to prevent platform specific differences.
@timbess timbess force-pushed the bugfix/cargo-home-crlf branch from 97acdf2 to fc62ff2 Compare May 27, 2025 16:52
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.

1 participant