From darcy at openjdk.org Tue Aug 30 00:12:33 2022 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 30 Aug 2022 00:12:33 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac Message-ID: Update to remove support for -source/-target/--release 7 from javac. As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work. ------------- Commit messages: - Small refactoring to remove more stale code. - Remove effectively dead code. - Adjust data for CheckExamples test. - Partial restore of DEFAULT_METHODS Source.Feature for test java/lang/invoke/defineHiddenClass/PreviewHiddenClass.java. - Merge branch 'master' into JDK-8173605 - Fix MultiReleaseJars.java. - Test fixes. - Clean langtools test run. - CheckExamples passes. - Type annotations. - ... and 13 more: https://git.openjdk.org/jdk/compare/76ee5495...f3095350 Changes: https://git.openjdk.org/jdk/pull/10074/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10074&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8173605 Stats: 4514 lines in 156 files changed: 25 ins; 4362 del; 127 mod Patch: https://git.openjdk.org/jdk/pull/10074.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10074/head:pull/10074 PR: https://git.openjdk.org/jdk/pull/10074 From darcy at openjdk.org Tue Aug 30 00:20:09 2022 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 30 Aug 2022 00:20:09 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 00:04:03 GMT, Joe Darcy wrote: > Update to remove support for -source/-target/--release 7 from javac. > > As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work. Please also review the accompanying CSR: https://bugs.openjdk.org/browse/JDK-8293047 Note that the DEFAULT_METHODS enum constant is used indirectly by a test to force a class file's minor version bits to be set as if a preview feature were used. If some other idiom is available, the DEFAULT_METHOD constant could be removed. Tier 1 and tier 2 test results were clean with this changes. ------------- PR: https://git.openjdk.org/jdk/pull/10074 From darcy at openjdk.org Tue Aug 30 01:05:23 2022 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 30 Aug 2022 01:05:23 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: <7caOzUK-O_rtHE24lEnLDODLPj_gvixrSSFI-Is5zS0=.78f37a82-868c-4719-9145-cb2bd8df0588@github.com> On Tue, 30 Aug 2022 00:16:09 GMT, Joe Darcy wrote: > Please also review the accompanying CSR: > > https://bugs.openjdk.org/browse/JDK-8293047 > > Note that the DEFAULT_METHODS enum constant is used indirectly by a test to force a class file's minor version bits to be set as if a preview feature were used. If some other idiom is available, the DEFAULT_METHOD constant could be removed. > > Tier 1 and tier 2 test results were clean with this changes. PS I'll run a copyright update script before any push. ------------- PR: https://git.openjdk.org/jdk/pull/10074 From alanb at openjdk.org Tue Aug 30 06:29:52 2022 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 30 Aug 2022 06:29:52 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 00:04:03 GMT, Joe Darcy wrote: > Update to remove support for -source/-target/--release 7 from javac. > > As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work. test/jdk/java/lang/reflect/OldenCompilingWithDefaults.java line 28: > 26: * @bug 8009267 > 27: * @summary Verify uses of isAnnotationPresent compile under older source versions > 28: * @compile OldenCompilingWithDefaults.java I skimmed through the description of JDK-8009267 and I'm wondering if this test is of any value now. ------------- PR: https://git.openjdk.org/jdk/pull/10074 From darcy at openjdk.org Tue Aug 30 21:59:10 2022 From: darcy at openjdk.org (Joe Darcy) Date: Tue, 30 Aug 2022 21:59:10 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 06:26:25 GMT, Alan Bateman wrote: >> Update to remove support for -source/-target/--release 7 from javac. >> >> As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work. > > test/jdk/java/lang/reflect/OldenCompilingWithDefaults.java line 28: > >> 26: * @bug 8009267 >> 27: * @summary Verify uses of isAnnotationPresent compile under older source versions >> 28: * @compile OldenCompilingWithDefaults.java > > I skimmed through the description of JDK-8009267 and I'm wondering if this test is of any value now. Certainly less useful than it once was! I can remove it in the next push. ------------- PR: https://git.openjdk.org/jdk/pull/10074 From vromero at openjdk.org Wed Aug 31 17:17:07 2022 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 31 Aug 2022 17:17:07 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 00:04:03 GMT, Joe Darcy wrote: > Update to remove support for -source/-target/--release 7 from javac. > > As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work. looks good to me the PR looks good to me. You have mentioned that further refactorings could be done later on, I agree but you are already removing a lot of code, although that could have been forced to make some tests pass. I would recommend removing some support for 7 at `com.sun.tools.javac.comp.Infer` particularly the one guarded by `allowGraphInference`. I can also help with that later on if you prefer. If so please assign a follow-up for this issue to myself ------------- Marked as reviewed by vromero (Reviewer). PR: https://git.openjdk.org/jdk/pull/10074 From darcy at openjdk.org Wed Aug 31 17:25:09 2022 From: darcy at openjdk.org (Joe Darcy) Date: Wed, 31 Aug 2022 17:25:09 GMT Subject: RFR: JDK-8173605: Remove support for source and target 1.7 option in javac In-Reply-To: References: Message-ID: On Wed, 31 Aug 2022 17:13:04 GMT, Vicente Romero wrote: > the PR looks good to me. You have mentioned that further refactorings could be done later on, I agree but you are already removing a lot of code, although that could have been forced to make some tests pass. I would recommend removing some support for 7 at `com.sun.tools.javac.comp.Infer` particularly the one guarded by `allowGraphInference`. I can also help with that later on if you prefer. If so please assign a follow-up for this issue to myself Thanks Vicente; I assigned JDK-8293051: Further refactor javac after removal of -source/-target/--release 7 to you. ------------- PR: https://git.openjdk.org/jdk/pull/10074