Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gets things to build and kinda work, but things are a bit janky:
generate_build_file
integration tests fails (but all other tests pass), because it depends onsh
which doesn't exist on windows. I disabled it for now.SetConsoleMode(..., ENABLE_VIRTUAL_TERMINAL_PROCESSING)
is enough, but ninja has a comment on how printing viaWriteConsoleOutput
is less janky, so maybe we'll want to do that.Actually running
n2
complained that/bin/sh
doesn't exist. It looks likestd::process::Command
doesn't have a way to just pass through a string toCreateProcess
. I asked about this here rust-lang/rust#92939 (comment) , but https://github.com/rust-lang/rust/blob/master/library/std/src/sys/windows/process.rs#L277 suggests Rust really wants user code to split apart the string (which on windows in general is impossible, since it's the job of every program to do args splitting itself, so they can all do different things and the launcher process can't generally know how every program does it), only to assemble it again in the stdlib. So we have to call CreateProcess and WaitForSingleObject etc ourselves. This part isn't 100% complete, it drops the output of the subprocess on the floor at the moment. But still, simple builds work.(The current threads + std::process::Command approach seems to cause file leaks, possibly due to the pipe/CLOEXEC race, so maybe we'll move off that at some point.)