Expand env vars in all arguments - #13034
Conversation
because that's what we did before
|
The old code I'm referring to is this: let rec loop acc args = match args with
| "--display" :: arg :: args ->
loop (arg :: "--display" :: acc) args
| arg :: args ->
loop (Helper.expand_env arg :: acc) args
| [] ->
List.rev acc
in
let args = loop [] args in
Arg.parse_argv ~current (Array.of_list ("" :: args)) all_args_spec args_callback "";If we ignore the I'm trying to understand how this is even related to the failing sys tests which don't appear to be about the expansion of environment variables in arguments at all. |
|
Those failing sys tests are complaining that %PATH% is being expanded when passed to native target programs. It seems somehow haxe is interferring with how those values are passed to the native programs. Also, this behaviour should be windows only, the |
|
Yes, for now I'd like to just bring back the old behavior and understand what actually changed because I'm worried that I'm overlooking something here. |
|
It looks like each target test also runs the eval one for some reason (which is why every target is failing): haxe/tests/sys/src/TestCommandBase.hx Line 16 in f966ed1 It seems even the arguments passed after |
It seems that way, but I don't understand why because that |
|
Maybe the previous setup was already splitting out the haxe compiler args from the |
|
Ah, I think you're right, that was this whole |
Yuxiao found that we broke this in #12737. There used to be an extra
loopthat wouldexpand_envall arguments, so I'm bringing that back for now.This currently causes consistent failures in the sys tests, which suggests that some behavior changed somewhere after all.