Print a suggestion for a common Windows footgun #3640
Merged
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.
After a wild ride trying to figure out what was failing here (snippet below)
@tahina-pro reminded me about the crazy expansion of wildcards in Windows. The shell does not expand them, the programs do it instead. So when we pass
--already_cached '*'
to F*, that asterisk is expanded to a list of arguments even if it's quoted. AFAIK this is done by some code injected into the program by the MinGW compiler, which we're using for Windows, and I'm not sure how to avoid it. This is why some--already_cached
had',*'
instead, a trick I forgot about in some new Makefiles.This PR documents the trick, by detecting this particular error on Windows builds and warning the user. (The asterisk is expanded to
.
..
, and then some files; the first.
is taken to be an argument of--already_cached
and we fail on the second.) Now we get this:(We also discovered that non-MinGW Cygwin builds (the ones you get if you install cygwin, clone the repo and build) are completely broken. I will follow up on that.)