RFR: Unstuck version [v2]
Jiří Vaněk
jvanek at openjdk.org
Sat Aug 27 18:05:39 UTC 2022
> 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 updated the pull request incrementally with one additional 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
-------------
Changes:
- all: https://git.openjdk.org/asmtools/pull/36/files
- new: https://git.openjdk.org/asmtools/pull/36/files/582e5f20..ed5a142e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=asmtools&pr=36&range=01
- incr: https://webrevs.openjdk.org/?repo=asmtools&pr=36&range=00-01
Stats: 115 lines in 9 files changed: 93 ins; 4 del; 18 mod
Patch: https://git.openjdk.org/asmtools/pull/36.diff
Fetch: git fetch https://git.openjdk.org/asmtools pull/36/head:pull/36
PR: https://git.openjdk.org/asmtools/pull/36
More information about the asmtools-dev
mailing list