Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5dIT-00082x-Kw for pljava-dev@arkaria.postgresql.org; Tue, 11 Aug 2020 23:03:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5dIS-0006u1-KJ for pljava-dev@arkaria.postgresql.org; Tue, 11 Aug 2020 23:03:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5dIS-0006tu-FZ for pljava-dev@lists.postgresql.org; Tue, 11 Aug 2020 23:03:08 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5dIP-0002Td-Vn for pljava-dev@lists.postgresql.org; Tue, 11 Aug 2020 23:03:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=l6ycbwAwWFKHSklTMVcvNtENlZ31bsXc9DjooJK9foQ=; b=V509h4Rl7USS0s5SqZXUMZqn8t vw3r6SeZKL4gNCHF63nmvS3S3YaOJUQr8O6OkP8zCWdVDptmWnoGQa73EcWrdF52BVv2TEvF5Xuwz BfxTQu+JR5CPUgoYUNJp3+Jos8gP8w9Tw1y1cbJ2of/B3RlGvYjhCZ/XzkFos+8omnWiDR5/jwxLO zg1OazFAc0rwKQMy6a7LgJmCzTSxfmOrFnDEOWm9fQwUY+k7F89ecrjPzD68eVEMePZmvN2vC+zOg gCy0KcwawKR+szV/HRDZ+0c4rc0tFb7z2k7zaC+xfZ7NjKwRbLBQsJJavA5iP3p4j1qrZkyi7zPY6 pfi7jOTQ==; Received: from [184.19.31.139] (port=60451) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1k5dIN-00AkGG-Bd; Tue, 11 Aug 2020 19:03:03 -0400 Subject: Re: PL/Java new build plugin To: Kartik Ohri References: <5F278CCE.1090006@anastigmatix.net> <5F2897AF.9040909@anastigmatix.net> <5F2A29E4.2000803@anastigmatix.net> <5F2EB313.8090706@anastigmatix.net> <5F2EE97B.1030108@anastigmatix.net> <5F30B425.4020402@anastigmatix.net> <5F331877.50407@anastigmatix.net> Cc: pljava-dev@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5F3323A6.3050202@anastigmatix.net> Date: Tue, 11 Aug 2020 19:03:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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