Skip to content

./miri squash fails on Windows #4340

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
RalfJung opened this issue May 21, 2025 · 7 comments
Open

./miri squash fails on Windows #4340

RalfJung opened this issue May 21, 2025 · 7 comments
Labels
A-dev Area: working on Miri as a developer A-windows Area: affects only Windows targets C-bug Category: This is a bug.

Comments

@RalfJung
Copy link
Member

@CraftSpider reports that ./miri squash fails on Windows.

@CraftSpider could you post the error message you are getting?

@RalfJung RalfJung added C-bug Category: This is a bug. A-dev Area: working on Miri as a developer A-windows Area: affects only Windows targets labels May 21, 2025
@CraftSpider
Copy link
Contributor

I'll do so when I have time - the problem may end up being not Windows-specific, I had to go to work basically immediately after seeing the error. It looked so mostly because it involved something with a mangled path - an error about no existing path for D:somepathhere/foo, but that's from memory.

@ChrisDenton
Copy link
Member

Is ./miri using a mingw bash shell (or is git)? Mingw would mangle windows paths by default so they'd need to be converted to the cygwin path (e.g. by calling cygpath 'D:\some\path\here').

@RalfJung
Copy link
Member Author

./miri invokes git directly, not via a shell... so sure where paths would be mangled.

@ChrisDenton
Copy link
Member

git itself might be using the bash shell. I'm pretty sure it still uses some internal scripts.

@CraftSpider
Copy link
Contributor

CraftSpider commented May 22, 2025

It's the path set in GIT_SEQUENCE_EDITOR - that path apparently is expected to point to a tool that git will execute in mingw, and thus should be a linux-like path, not a Windows-like one.

(edit: 'execute in mingw' may not be the right wording here - but at the least, it expects a path that will be resolved in a linuxy way)

@CraftSpider
Copy link
Contributor

Error:

hint: Waiting for your editor to close the file... C:\Dev\Git\miri\miri-script\target\debug\miri-script.exe: line 1: C:DevGitmirimiri-scripttargetdebugmiri-script.exe: command not found
error: there was a problem with the editor 'C:\Dev\Git\miri\miri-script\target\debug\miri-script.exe'
Error: `git rebase` failed

@RalfJung
Copy link
Member Author

RalfJung commented May 22, 2025

Uh, wtf? Why does it interpret escape sequences in an environment variable?!? Or how else are the backslashes disappearing?
It makes no sense to me that we'd have to specifically mangle this path (and I assume doing so would break things for other builds of git that are more Windows-native), this seems like a MinGW / git-for-windows bug to me.

For reference, here's where we are setting this environment variable:

cmd.env("GIT_SEQUENCE_EDITOR", env::current_exe()?);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dev Area: working on Miri as a developer A-windows Area: affects only Windows targets C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants