You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We basically have nearly no core way to specify alternate argument quoting when calling other processes.
While we currently use libuv's method of quoting that works in most places, the most prominent place where that fails is with Windows batch files go through cmd.exe, which requires alternative quoting.
I propose we add an alternate quoting method that will be requested with :arg-quoting named parameter to &run and Proc::Async.new. That will have values:
(default) auto. This is the "best way", whatever we decide is best to use for the OS in question. At the moment, this will be what we currently do and use libuv's quoting
cmd.exe. This will quote the arguments as auto on non-Windows ($*DISTRO.is-win === False) OSes and on Windows they will be quoted to be suitable for acceptance by Window's cmd.exe
There's also room for an arg that will do heuristic approach of trying one way and then another if the first one results in failure (IIRC Perl 5 does this sort of thing).
The cmd.exe quoting (on MoarVM) will be done by our own routine, so as I imagine this RFC is for most of the work to be done in MoarVM and the arg to be simply passed into it.
The text was updated successfully, but these errors were encountered:
The Problem
We basically have nearly no core way to specify alternate argument quoting when calling other processes.
While we currently use libuv's method of quoting that works in most places, the most prominent place where that fails is with Windows batch files go through cmd.exe, which requires alternative quoting.
Since on Windows
perl6is itself a batch file, this issue causes RT#132258 as well as a ton of Windows roast failures.Proposal
I propose we add an alternate quoting method that will be requested with
:arg-quotingnamed parameter to&runandProc::Async.new. That will have values:auto. This is the "best way", whatever we decide is best to use for the OS in question. At the moment, this will be what we currently do and use libuv's quotingcmd.exe. This will quote the arguments asautoon non-Windows ($*DISTRO.is-win === False) OSes and on Windows they will be quoted to be suitable for acceptance by Window's cmd.exeThere's also room for an arg that will do heuristic approach of trying one way and then another if the first one results in failure (IIRC Perl 5 does this sort of thing).
The
cmd.exequoting (on MoarVM) will be done by our own routine, so as I imagine this RFC is for most of the work to be done in MoarVM and the arg to be simply passed into it.The text was updated successfully, but these errors were encountered: