RFR: Unstuck version [v3]
Jiří Vaněk
jvanek at openjdk.org
Wed Aug 31 07:53:25 UTC 2022
On Sat, 27 Aug 2022 18:12:37 GMT, Jiří Vaněk <jvanek at openjdk.org> wrote:
>> Hello! This pr is solving - and is not - the hanged waiting for stdin for no file argument.
>> 1) it properly exits after version is printed, thus is unaffected by any file arguments (and streams) which may change alter
>> 2) it changes the Stream (and extending) input implemetation to lazily drain the stream once needed, not durign construction. TBH, I'm not sure with this change, but I was generally very unhappy by draining the stream in cosntructor at all. This alone, would not solve the -version problem, because the StreamInput is added always, and thus is always processed, thus stdin is read no meter if it is lazy or in constructor.
>>
>> This intentionally do not add the empty "-" switch. That may come later as needed.
>>
>> Hints welcomed!
>
> Jiří Vaněk has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> reworked stdin read to be initiated by -
>
> As a side effect, files and stdin can be read together
> remove dduplicated code in tests by getting class in compile time
> added tests and adapted older to new behavior
By the quick glance I have not found it. I definitely agree that the unified cant read should be there + trace in verbose.. and with al the nice diagnostic syntax errors when I say "pretty please" :)
Those should go to the the stderr by default, and shoudl be there. And should be configurable by the same mechanism as I do the stdin/out. I'm pretty sure I wil hit it several time and fix it on longer run.
Can this PR be merged please?
-------------
PR: https://git.openjdk.org/asmtools/pull/36
More information about the asmtools-dev
mailing list