From christoph.langer at sap.com Thu Apr 2 10:50:17 2020 From: christoph.langer at sap.com (Langer, Christoph) Date: Thu, 2 Apr 2020 10:50:17 +0000 Subject: RFR(S): 8242030: Wrong package declarations in jline classes after JDK-8241598 Message-ID: Hi, looks like 2 wrong package statements crept in with the change for JDK-8241598 (Upgrade JLine to 3.14.0). My IDE is complaining. Please review the fix: Bug: https://bugs.openjdk.java.net/browse/JDK-8242030 Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8242030.0/ Thanks Christoph From jan.lahoda at oracle.com Thu Apr 2 11:42:08 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 2 Apr 2020 13:42:08 +0200 Subject: RFR(S): 8242030: Wrong package declarations in jline classes after JDK-8241598 In-Reply-To: References: Message-ID: <4817d05a-213e-e84b-362d-1eef163bee55@oracle.com> Looks good to me. Sorry for the trouble. Jan On 02. 04. 20 12:50, Langer, Christoph wrote: > Hi, > > looks like 2 wrong package statements crept in with the change for > JDK-8241598 (Upgrade JLine to 3.14.0). My IDE is complaining. > > Please review the fix: > > Bug: https://bugs.openjdk.java.net/browse/JDK-8242030 > > Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8242030.0/ > > Thanks > > Christoph > From christoph.langer at sap.com Fri Apr 3 13:42:13 2020 From: christoph.langer at sap.com (Langer, Christoph) Date: Fri, 3 Apr 2020 13:42:13 +0000 Subject: RFR(S): 8242030: Wrong package declarations in jline classes after JDK-8241598 In-Reply-To: <4817d05a-213e-e84b-362d-1eef163bee55@oracle.com> References: <4817d05a-213e-e84b-362d-1eef163bee55@oracle.com> Message-ID: Thanks for the review, Jan. I just pushed it - no troubles ?? > -----Original Message----- > From: Jan Lahoda > Sent: Donnerstag, 2. April 2020 13:42 > To: Langer, Christoph ; kulla- > dev at openjdk.java.net > Subject: Re: RFR(S): 8242030: Wrong package declarations in jline classes > after JDK-8241598 > > Looks good to me. Sorry for the trouble. > > Jan > > On 02. 04. 20 12:50, Langer, Christoph wrote: > > Hi, > > > > looks like 2 wrong package statements crept in with the change for > > JDK-8241598 (Upgrade JLine to 3.14.0). My IDE is complaining. > > > > Please review the fix: > > > > Bug: https://bugs.openjdk.java.net/browse/JDK-8242030 > > > > Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8242030.0/ > > > > Thanks > > > > Christoph > > From jan.lahoda at oracle.com Fri Apr 3 15:21:19 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 3 Apr 2020 08:21:19 -0700 (PDT) Subject: JDK-8241950: JShell could support auto-indent Message-ID: <0fc36da3-b753-ce8e-f69d-45df9e064ead@oracle.com> Hi, The recent upgrade to JLine 3.14.0 allows us to enable auto-indent, so that typing a '{' and pressing enter will automatically increase the indent of following lines by 4, and typing a '}' will automatically decrease the indent. The indent amount is configurable using /set indent. Webrev: http://cr.openjdk.java.net/~jlahoda/8241950/webrev.00/ JBS: https://bugs.openjdk.java.net/browse/JDK-8241950 What do you think? Thanks, Jan From jan.lahoda at oracle.com Mon Apr 6 11:10:54 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 6 Apr 2020 13:10:54 +0200 Subject: RFR: JDK-8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: <7bff733d-a800-a006-731b-e34375f379e2@oracle.com> References: <7bff733d-a800-a006-731b-e34375f379e2@oracle.com> Message-ID: <56f7c9ac-d6db-bec3-414e-0f760b6d4278@oracle.com> Hi, Unfortunately turned out that there's a small bug in the patch - for expression lambdas, we don't need to (and should not) append a return statement (expression lambdas have an "implicit" return; and we cannot cast the expression to block). Diff from the previous iteration: http://cr.openjdk.java.net/~jlahoda/8240658/webrev.00-01/ Updated patch: http://cr.openjdk.java.net/~jlahoda/8240658/webrev.01/ Any comments are welcome! Thanks, Jan On 18. 03. 20 20:26, Vicente Romero wrote: > looks good, > Vicente > > On 3/13/20 8:20 AM, Jan Lahoda wrote: >> Hi, >> >> When a method invocation requires type inference, and the user is in >> the process of typing of a (block) lambda that is a parameter to the >> method invocation, javac may not, in some cases, perform the type >> inference, which then may lead to non working code completion in >> JShell (and possibly other tools). >> >> For example (in JShell): >> Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. >> >> and press - this leads to no proposals currently, as the type of >> "v" is not inferred. >> >> The idea of the proposed patch is to improve the recovery in cases >> significant for cases where the text is being typed, and allow type >> inference in these cases. The type of "v" is then inferred, and the >> code completion works. >> >> Proposed patch: >> http://cr.openjdk.java.net/~jlahoda/8240658/webrev.00/ >> >> JBS: https://bugs.openjdk.java.net/browse/JDK-8240658 >> >> Thanks, >> ??? Jan > From robert.field at oracle.com Mon Apr 6 15:37:33 2020 From: robert.field at oracle.com (Robert Field) Date: Mon, 6 Apr 2020 08:37:33 -0700 Subject: JDK-8241950: JShell could support auto-indent In-Reply-To: <0fc36da3-b753-ce8e-f69d-45df9e064ead@oracle.com> References: <0fc36da3-b753-ce8e-f69d-45df9e064ead@oracle.com> Message-ID: <0e5f738e-c825-9832-e91f-c958fa44cc77@oracle.com> Very cool! One nit: /set doesn't show indent. jshell> /set |? /set editor -default |? /set start -default |? /set feedback normal | |? Available feedback modes: |???? concise |???? normal |???? silent |???? verbose | |? To show mode settings use '/set prompt', '/set truncation', ... |? or use '/set mode' followed by the feedback mode name. -Robert On 2020-04-03 08:21, Jan Lahoda wrote: > Hi, > > The recent upgrade to JLine 3.14.0 allows us to enable auto-indent, so > that typing a '{' and pressing enter will automatically increase the > indent of following lines by 4, and typing a '}' will automatically > decrease the indent. The indent amount is configurable using /set indent. > > Webrev: > http://cr.openjdk.java.net/~jlahoda/8241950/webrev.00/ > JBS: https://bugs.openjdk.java.net/browse/JDK-8241950 > > What do you think? > > Thanks, > ??? Jan From jan.lahoda at oracle.com Thu Apr 9 14:08:22 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 9 Apr 2020 16:08:22 +0200 Subject: JDK-8241950: JShell could support auto-indent In-Reply-To: <0e5f738e-c825-9832-e91f-c958fa44cc77@oracle.com> References: <0fc36da3-b753-ce8e-f69d-45df9e064ead@oracle.com> <0e5f738e-c825-9832-e91f-c958fa44cc77@oracle.com> Message-ID: <1e1cb40c-89ff-9f00-417e-60221a254e65@oracle.com> Thanks Robert. I've updated /set to do that, so now it looks like this: jshell> /set | /set editor -default | /set indent 4 | /set start -default | /set feedback normal | | Available feedback modes: | concise | normal | silent | verbose | | To show mode settings use '/set prompt', '/set truncation', ... | or use '/set mode' followed by the feedback mode name. Diff to previous iteration: http://cr.openjdk.java.net/~jlahoda/8241950/webrev.delta.00.01/ Full updated patch: http://cr.openjdk.java.net/~jlahoda/8241950/webrev.01/ What do you think? Thanks, Jan On 06. 04. 20 17:37, Robert Field wrote: > Very cool! > > One nit: > > /set doesn't show indent. > > ?? jshell> /set > ?? |? /set editor -default > ?? |? /set start -default > ?? |? /set feedback normal > ?? | > ?? |? Available feedback modes: > ?? |???? concise > ?? |???? normal > ?? |???? silent > ?? |???? verbose > ?? | > ?? |? To show mode settings use '/set prompt', '/set truncation', ... > ?? |? or use '/set mode' followed by the feedback mode name. > > -Robert > > On 2020-04-03 08:21, Jan Lahoda wrote: >> Hi, >> >> The recent upgrade to JLine 3.14.0 allows us to enable auto-indent, so >> that typing a '{' and pressing enter will automatically increase the >> indent of following lines by 4, and typing a '}' will automatically >> decrease the indent. The indent amount is configurable using /set indent. >> >> Webrev: >> http://cr.openjdk.java.net/~jlahoda/8241950/webrev.00/ >> JBS: https://bugs.openjdk.java.net/browse/JDK-8241950 >> >> What do you think? >> >> Thanks, >> ??? Jan From robert.field at oracle.com Thu Apr 9 20:05:31 2020 From: robert.field at oracle.com (Robert Field) Date: Thu, 9 Apr 2020 13:05:31 -0700 Subject: JDK-8241950: JShell could support auto-indent In-Reply-To: <1e1cb40c-89ff-9f00-417e-60221a254e65@oracle.com> References: <0fc36da3-b753-ce8e-f69d-45df9e064ead@oracle.com> <0e5f738e-c825-9832-e91f-c958fa44cc77@oracle.com> <1e1cb40c-89ff-9f00-417e-60221a254e65@oracle.com> Message-ID: Thumbs up! -Robert On 2020-04-09 07:08, Jan Lahoda wrote: > Thanks Robert. I've updated /set to do that, so now it looks like this: > > jshell> /set > |? /set editor -default > |? /set indent 4 > |? /set start -default > |? /set feedback normal > | > |? Available feedback modes: > |???? concise > |???? normal > |???? silent > |???? verbose > | > |? To show mode settings use '/set prompt', '/set truncation', ... > |? or use '/set mode' followed by the feedback mode name. > > > Diff to previous iteration: > http://cr.openjdk.java.net/~jlahoda/8241950/webrev.delta.00.01/ > > Full updated patch: > http://cr.openjdk.java.net/~jlahoda/8241950/webrev.01/ > > What do you think? > > Thanks, > ??? Jan > > On 06. 04. 20 17:37, Robert Field wrote: >> Very cool! >> >> One nit: >> >> /set doesn't show indent. >> >> ??? jshell> /set >> ??? |? /set editor -default >> ??? |? /set start -default >> ??? |? /set feedback normal >> ??? | >> ??? |? Available feedback modes: >> ??? |???? concise >> ??? |???? normal >> ??? |???? silent >> ??? |???? verbose >> ??? | >> ??? |? To show mode settings use '/set prompt', '/set truncation', ... >> ??? |? or use '/set mode' followed by the feedback mode name. >> >> -Robert >> >> On 2020-04-03 08:21, Jan Lahoda wrote: >>> Hi, >>> >>> The recent upgrade to JLine 3.14.0 allows us to enable auto-indent, >>> so that typing a '{' and pressing enter will automatically increase >>> the indent of following lines by 4, and typing a '}' will >>> automatically decrease the indent. The indent amount is configurable >>> using /set indent. >>> >>> Webrev: >>> http://cr.openjdk.java.net/~jlahoda/8241950/webrev.00/ >>> JBS: https://bugs.openjdk.java.net/browse/JDK-8241950 >>> >>> What do you think? >>> >>> Thanks, >>> ??? Jan From sundararajan.athijegannathan at oracle.com Thu Apr 16 12:59:30 2020 From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com) Date: Thu, 16 Apr 2020 18:29:30 +0530 Subject: RFR 8242931: Few more tests that use nashorn have been missed Message-ID: Nashorn engine removal fix (8241749: Remove the Nashorn JavaScript Engine) missed updating few tests, config files. Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8242931 Webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.00/ PS I'm disabling tests by adding @ignore. I've filed bugs for the tests. Please revisit port or remove these nashorn using tests Thanks, -Sundar From Alan.Bateman at oracle.com Thu Apr 16 13:10:14 2020 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 16 Apr 2020 14:10:14 +0100 Subject: RFR 8242931: Few more tests that use nashorn have been missed In-Reply-To: References: Message-ID: <6e45f66e-4b23-b367-dfc1-ed473a6f39d6@oracle.com> On 16/04/2020 13:59, sundararajan.athijegannathan at oracle.com wrote: > Nashorn engine removal fix (8241749: Remove the Nashorn JavaScript > Engine) missed updating few tests, config files. > > Please review. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8242931 > > Webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.00/ > > PS I'm disabling tests by adding @ignore. I've filed bugs for the > tests. Please revisit port or remove these nashorn using tests Can you use the jtreg exclude lists (ProblemList.txt files) instead? We moved away from @ignore a few ago to make it easier to track excluded tests. -Alan From jan.lahoda at oracle.com Thu Apr 16 13:40:24 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 16 Apr 2020 15:40:24 +0200 Subject: RFR: JDK-8242919: Paste locks up jshell Message-ID: <037f2b2c-7c40-4432-ee39-a3125168be29@oracle.com> Hi, Pasting inside JShell causes JShell to lock up. The reason is that JLine detects the paste, and reads until an "end-of-paste" marker. This reading is done in blocks. But, as the streams are set-up in JShell, it will wait until the (last) block[1] is filled up before returning, but the user is not providing any input, expecting the paste to finish. The proposed solution is to make sure the InputStreams in JShell are set-up so that it does not wait until the block is filled. Webrev: http://cr.openjdk.java.net/~jlahoda/8242919/webrev.00/ JBS: https://bugs.openjdk.java.net/browse/JDK-8242919 How does this look? Thanks, Jan [1] https://github.com/openjdk/jdk/blob/3cc1fdf2b60b388abdf53e8e053b9fab8f2f959c/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStream.java#L81 From sundararajan.athijegannathan at oracle.com Thu Apr 16 16:26:44 2020 From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com) Date: Thu, 16 Apr 2020 21:56:44 +0530 Subject: RFR 8242931: Few more tests that use nashorn have been missed In-Reply-To: References: <6e45f66e-4b23-b367-dfc1-ed473a6f39d6@oracle.com> Message-ID: <1707876a-a671-d7cc-6af3-59dcc11f6aab@oracle.com> Please review updated webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.01/ Thanks, -Sundar On 16/04/20 6:49 pm, David Holmes wrote: > +1 Please problem list the tests under the associated bug ids. > > Thanks, > David > > On 16/04/2020 11:10 pm, Alan Bateman wrote: >> On 16/04/2020 13:59, sundararajan.athijegannathan at oracle.com wrote: >>> Nashorn engine removal fix (8241749: Remove the Nashorn JavaScript >>> Engine) missed updating few tests, config files. >>> >>> Please review. >>> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8242931 >>> >>> Webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.00/ >>> >>> PS I'm disabling tests by adding @ignore. I've filed bugs for the >>> tests. Please revisit port or remove these nashorn using tests >> Can you use the jtreg exclude lists (ProblemList.txt files) instead? >> We moved away from @ignore a few ago to make it easier to track >> excluded tests. >> >> -Alan From sundararajan.athijegannathan at oracle.com Thu Apr 16 18:00:44 2020 From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com) Date: Thu, 16 Apr 2020 23:30:44 +0530 Subject: RFR 8242931: Few more tests that use nashorn have been missed In-Reply-To: <54b64a4b-5d4f-0fc9-3242-b50fdcb4b0e1@oracle.com> References: <6e45f66e-4b23-b367-dfc1-ed473a6f39d6@oracle.com> <1707876a-a671-d7cc-6af3-59dcc11f6aab@oracle.com> <54b64a4b-5d4f-0fc9-3242-b50fdcb4b0e1@oracle.com> Message-ID: <0c86efad-1cbb-55a3-7872-bd9453a596c2@oracle.com> Thanks Daniel. Fixed it. Updated webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.02/ PS. Submitting mach5 job concurrently. Thanks, -Sundar On 16/04/20 11:16 pm, Daniel Fuchs wrote: > Hi Sundar, > > I spotted a typo (generial vs generic) test/jdk/ProblemList.txt: > > ?936 java/util/ServiceLoader/ReloadTest.java 8242935 generial-all > > This is not an area I know well - so maybe wait for at least > another opinion (reviewer or not) but what I saw looked > reasonable. > > You have my review. > > best regards, > > -- daniel > > On 16/04/2020 17:26, sundararajan.athijegannathan at oracle.com wrote: >> Please review updated webrev: >> http://cr.openjdk.java.net/~sundar/8242931/webrev.01/ >> >> Thanks, >> >> -Sundar >> >> On 16/04/20 6:49 pm, David Holmes wrote: >>> +1 Please problem list the tests under the associated bug ids. >>> >>> Thanks, >>> David >>> >>> On 16/04/2020 11:10 pm, Alan Bateman wrote: >>>> On 16/04/2020 13:59, sundararajan.athijegannathan at oracle.com wrote: >>>>> Nashorn engine removal fix (8241749: Remove the Nashorn JavaScript >>>>> Engine) missed updating few tests, config files. >>>>> >>>>> Please review. >>>>> >>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8242931 >>>>> >>>>> Webrev: http://cr.openjdk.java.net/~sundar/8242931/webrev.00/ >>>>> >>>>> PS I'm disabling tests by adding @ignore. I've filed bugs for the >>>>> tests. Please revisit port or remove these nashorn using tests >>>> Can you use the jtreg exclude lists (ProblemList.txt files) >>>> instead? We moved away from @ignore a few ago to make it easier to >>>> track excluded tests. >>>> >>>> -Alan > > > From jan.lahoda at oracle.com Fri Apr 24 15:38:08 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 24 Apr 2020 17:38:08 +0200 Subject: RFR: JDK-8243557: Inconvenient span for multi-catch error diagnostics Message-ID: <62fbb7c0-d762-6be6-e61e-b0a84d0c93c1@oracle.com> Hi, A very small tweak to diagnostic spans. In some cases, errors for multi-catches don't have a very nice spans. Like for example in the following case shown by JShell: jshell> try { ...> } catch (IllegalStateException | IOException ex) {} | Error: | exception java.io.IOException is never thrown in body of corresponding try statement | } catch (IllegalStateException | IOException ex) {} | ^-----------------------------------------------^ underlining the whole catch clause feels unnecessary - the issue is only in IOException. With the proposed patch, the span is much more precise: jshell> try { ...> } catch (IllegalStateException | IOException ex) {} | Error: | exception java.io.IOException is never thrown in body of corresponding try statement | } catch (IllegalStateException | IOException ex) {} | ^---------^ Webrev: http://cr.openjdk.java.net/~jlahoda/8243557/webrev.00/ JBS: https://bugs.openjdk.java.net/browse/JDK-8243557 How does this look? Thanks, Jan From vicente.romero at oracle.com Thu Apr 30 14:14:39 2020 From: vicente.romero at oracle.com (Vicente Romero) Date: Thu, 30 Apr 2020 10:14:39 -0400 Subject: RFR: JDK-8243557: Inconvenient span for multi-catch error diagnostics In-Reply-To: <62fbb7c0-d762-6be6-e61e-b0a84d0c93c1@oracle.com> References: <62fbb7c0-d762-6be6-e61e-b0a84d0c93c1@oracle.com> Message-ID: <0d989380-3599-94e7-0f0a-1605caed3df5@oracle.com> looks good, Vicente On 4/24/20 11:38 AM, Jan Lahoda wrote: > Hi, > > A very small tweak to diagnostic spans. In some cases, errors for > multi-catches don't have a very nice spans. Like for example in the > following case shown by JShell: > > jshell> try { > ?? ...> } catch (IllegalStateException | IOException ex) {} > |? Error: > |? exception java.io.IOException is never thrown in body of > corresponding try statement > |? } catch (IllegalStateException | IOException ex) {} > |??? ^-----------------------------------------------^ > > > underlining the whole catch clause feels unnecessary - the issue is > only in IOException. > > With the proposed patch, the span is much more precise: > jshell> try { > ?? ...> } catch (IllegalStateException | IOException ex) {} > |? Error: > |? exception java.io.IOException is never thrown in body of > corresponding try statement > |? } catch (IllegalStateException | IOException ex) {} > |?????????????????????????????????? ^---------^ > > > Webrev: http://cr.openjdk.java.net/~jlahoda/8243557/webrev.00/ > JBS: https://bugs.openjdk.java.net/browse/JDK-8243557 > > How does this look? > > Thanks, > ??? Jan