RFR: 8256308: Send arguments to javac server in a config file
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Nov 23 12:57:56 UTC 2020
I hope I could adequately answer why @files is not a solution to the
problem I need to solve.
Since this is a blocker for the winenv rewrite, I'd very much like to
have this integrated. And I'd very much like to have a review from
anyone in the lang tools team, and not just Erik's.
Anyone, please?
/Magnus
On 2020-11-16 13:43, Magnus Ihse Bursie wrote:
> I would appreciate if someone from langtools could have a look at this
> as well. Thanks!
>
> /Magnus
>
> On 2020-11-12 23:23, Magnus Ihse Bursie wrote:
>> Currently, to use the javac server, a horrendously long command line
>> option is created, looking like this: `--server:portfile=<path to
>> portfile>:sjavac=<command to launch server>`, where the sjavac
>> command has had all spaces replaced by %20. Since Project Jigsaw, the
>> set of module arguments needed is huge to begin with, making this
>> command line incomprehensible after mangling.
>>
>> Apart from making java command lines hard to read (and copy/paste!)
>> by developers, it also makes it hard for scripts to parse. The
>> upcoming winenv rewrite is dependent on being able to differentiate
>> between path names and other arguments, which is not possible in this
>> mess.
>>
>> So, instead, let's write it to a file, without any escaping, and just
>> pass the configuration file name to the server.
>>
>> Note that this will change the behavior of the javac server, but as
>> the source code states this is not a documented or externally
>> supported API no CSR is needed.
>>
>> I also cleaned up some code in SjavacClient, in particular code
>> relating to the passing of arguments. (We never change poolsize or
>> keepalive when we call it.)
>>
>> -------------
>>
>> Commit messages:
>> - 8256308: Send arguments to javac server in a config file
>>
>> Changes: https://git.openjdk.java.net/jdk/pull/1195/files
>> Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1195&range=00
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8256308
>> Stats: 118 lines in 3 files changed: 48 ins; 33 del; 37 mod
>> Patch: https://git.openjdk.java.net/jdk/pull/1195.diff
>> Fetch: git fetch https://git.openjdk.java.net/jdk
>> pull/1195/head:pull/1195
>>
>> PR: https://git.openjdk.java.net/jdk/pull/1195
>
More information about the compiler-dev
mailing list