From: | Chapman Flack <chap(at)anastigmatix(dot)net> |
---|---|
To: | Kartik Ohri <kartikohri13(at)gmail(dot)com> |
Cc: | pljava-dev(at)lists(dot)postgresql(dot)org |
Subject: | Re: PL/Java new build plugin |
Date: | 2020-08-11 23:03:02 |
Message-ID: | 5F3323A6.3050202@anastigmatix.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 08/11/20 18:49, Kartik Ohri wrote:
> Yes, I agree with you. I used String.join because the ProcessBuilder
> documentation said that "here are operating systems where programs are
> expected to tokenize command line strings themselves - on such a system a
> Java implementation might require commands to contain exactly two elements".
> I was not sure if this was relevant but tried to incorporate it.
Hmm, I suppose there could conceivably be some OS, and some implementation
of Java for that OS, where that limitation would exist. But the only OS
in common use that I know of that treats the command line that way is
Windows, and at least for the Oracle and OpenJDK implementation (again,
what is in common use), it does not require you to give ProcessBuilder
only two elements.
It will take the list of n arguments you give it, and try to construct
a correct Windows joined command line from them, only it gets the rules
somewhat wrong and so its transformation isn't correct, hence the need
for us to preprocess. The OpenJDK code where it does that is linked to
from several comments in the preprocessing transformation code that I hope
you are looking at.
If in the future we ever needed to support some other OS "A" and the
Java implementation for "A" required ProcessBuilder to take only two
elements, we could again handle that as a preprocessing transformation
of a ProcessBuilder with n args, transforming them to two.
Regards,
-Chap
From | Date | Subject | |
---|---|---|---|
Next Message | Kartik Ohri | 2020-08-13 21:24:24 | Re: PL/Java new build plugin |
Previous Message | Kartik Ohri | 2020-08-11 22:49:53 | Re: PL/Java new build plugin |