From mcimadamore at openjdk.java.net Tue Jun 15 20:27:30 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Tue, 15 Jun 2021 20:27:30 GMT Subject: [jdk17] RFR: 8268768: idea.sh has been updated in surprising and incompatible ways In-Reply-To: References: Message-ID: On Tue, 15 Jun 2021 19:50:12 GMT, Erik Joelsson wrote: > This comment should now end up in ide-support-dev as well. Not really (at least for now) :-) ------------- PR: https://git.openjdk.java.net/jdk17/pull/61 From erikj at openjdk.java.net Tue Jun 15 19:53:13 2021 From: erikj at openjdk.java.net (Erik Joelsson) Date: Tue, 15 Jun 2021 19:53:13 GMT Subject: [jdk17] RFR: 8268768: idea.sh has been updated in surprising and incompatible ways In-Reply-To: References: Message-ID: On Tue, 15 Jun 2021 16:10:01 GMT, Maurizio Cimadamore wrote: > As the title says (please also refer to the JBS issue which describes all the issues in more details), the IDE support for IntelliJ has been updated with many enhancements as part of a seemingly innocuous "path handling" fix. The IDE doesn't appear to be usable in the same way it was in the past and many functionalities have been broken as a result (including support for jtreg test execution using the plugin). > > For the above reasons, I'm reverting the plugin and idea.sh code to last known working version. Any targeted fix can be re-applied after the revert. Larger enhancements need to be discussed in the proper venue: > > https://openjdk.java.net/groups/ide-support/ This comment should now end up in ide-support-dev as well. ------------- PR: https://git.openjdk.java.net/jdk17/pull/61 From erikj at openjdk.java.net Tue Jun 15 20:35:10 2021 From: erikj at openjdk.java.net (Erik Joelsson) Date: Tue, 15 Jun 2021 20:35:10 GMT Subject: [jdk17] RFR: 8268768: idea.sh has been updated in surprising and incompatible ways In-Reply-To: References: Message-ID: <2sVzrAc2Trd7YOsPd33QcMp-8sIQX4mc7KXWqgfLuoY=.13bd3b1e-a1e1-4b4e-a5e3-4803ae4e8ae0@github.com> On Tue, 15 Jun 2021 16:10:01 GMT, Maurizio Cimadamore wrote: > As the title says (please also refer to the JBS issue which describes all the issues in more details), the IDE support for IntelliJ has been updated with many enhancements as part of a seemingly innocuous "path handling" fix. The IDE doesn't appear to be usable in the same way it was in the past and many functionalities have been broken as a result (including support for jtreg test execution using the plugin). > > For the above reasons, I'm reverting the plugin and idea.sh code to last known working version. Any targeted fix can be re-applied after the revert. Larger enhancements need to be discussed in the proper venue: > > https://openjdk.java.net/groups/ide-support/ It got stuck in moderation. Tim has fixed the config now, so this message should hopefully appear. ------------- PR: https://git.openjdk.java.net/jdk17/pull/61 From mcimadamore at openjdk.java.net Tue Jun 15 20:40:40 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Tue, 15 Jun 2021 20:40:40 GMT Subject: [jdk17] RFR: 8268768: idea.sh has been updated in surprising and incompatible ways In-Reply-To: <2sVzrAc2Trd7YOsPd33QcMp-8sIQX4mc7KXWqgfLuoY=.13bd3b1e-a1e1-4b4e-a5e3-4803ae4e8ae0@github.com> References: <2sVzrAc2Trd7YOsPd33QcMp-8sIQX4mc7KXWqgfLuoY=.13bd3b1e-a1e1-4b4e-a5e3-4803ae4e8ae0@github.com> Message-ID: On Tue, 15 Jun 2021 20:31:52 GMT, Erik Joelsson wrote: > It got stuck in moderation. Tim has fixed the config now, so this message should hopefully appear. Yep - I see emails now. Thanks this is really useful! ------------- PR: https://git.openjdk.java.net/jdk17/pull/61 From mcimadamore at openjdk.java.net Tue Jun 15 20:40:41 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Tue, 15 Jun 2021 20:40:41 GMT Subject: [jdk17] Integrated: 8268768: idea.sh has been updated in surprising and incompatible ways In-Reply-To: References: Message-ID: <_R-KLkuGvNEqaQHiYDNoaUn2cuPZvpPJj0ULIz0_erI=.69f5dd00-b7a2-4f43-8194-d2e1f32e9794@github.com> On Tue, 15 Jun 2021 16:10:01 GMT, Maurizio Cimadamore wrote: > As the title says (please also refer to the JBS issue which describes all the issues in more details), the IDE support for IntelliJ has been updated with many enhancements as part of a seemingly innocuous "path handling" fix. The IDE doesn't appear to be usable in the same way it was in the past and many functionalities have been broken as a result (including support for jtreg test execution using the plugin). > > For the above reasons, I'm reverting the plugin and idea.sh code to last known working version. Any targeted fix can be re-applied after the revert. Larger enhancements need to be discussed in the proper venue: > > https://openjdk.java.net/groups/ide-support/ This pull request has now been integrated. Changeset: 788b3095 Author: Maurizio Cimadamore URL: https://git.openjdk.java.net/jdk17/commit/788b309563610b690306211790af17954f7556cb Stats: 690 lines in 12 files changed: 492 ins; 63 del; 135 mod 8268768: idea.sh has been updated in surprising and incompatible ways Reviewed-by: erikj ------------- PR: https://git.openjdk.java.net/jdk17/pull/61 From jwilhelm at openjdk.java.net Tue Jun 15 22:01:09 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 15 Jun 2021 22:01:09 GMT Subject: RFR: Merge jdk17 Message-ID: Forwardport JDK 17 -> JDK 18 ------------- Commit messages: - Merge jdk17 - 8268768: idea.sh has been updated in surprising and incompatible ways - 8268828: ProblemList compiler/intrinsics/VectorizedMismatchTest.java on win-x64 - 8268723: Problem list SA core file tests on OSX when using ZGC - 8268736: Use apiNote in AutoCloseable.close javadoc - 8263321: Regression 8% in javadoc-steady in 17-b11 - 8268125: ZGC: Clone oop array gets wrong acopy stub - 8268663: Crash when guards contain boolean expression - 8268347: C2: nested locks optimization may create unbalanced monitor enter/exit code - 8268643: SVML lib shouldn't be generated when C2 is absent - ... and 7 more: https://git.openjdk.java.net/jdk/compare/0b09129f...e748b877 The webrevs contain the adjustments done while merging with regards to each parent branch: - master: https://webrevs.openjdk.java.net/?repo=jdk&pr=4499&range=00.0 - jdk17: https://webrevs.openjdk.java.net/?repo=jdk&pr=4499&range=00.1 Changes: https://git.openjdk.java.net/jdk/pull/4499/files Stats: 1606 lines in 62 files changed: 1180 ins; 181 del; 245 mod Patch: https://git.openjdk.java.net/jdk/pull/4499.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4499/head:pull/4499 PR: https://git.openjdk.java.net/jdk/pull/4499 From jwilhelm at openjdk.java.net Tue Jun 15 22:49:40 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 15 Jun 2021 22:49:40 GMT Subject: RFR: Merge jdk17 [v2] In-Reply-To: References: Message-ID: > Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 25 additional commits since the last revision: - Merge jdk17 - 8268620: InfiniteLoopException test may fail on x86 platforms Reviewed-by: prr, trebari, azvegint - 8268125: ZGC: Clone oop array gets wrong acopy stub Reviewed-by: kvn, vlivanov - 8238649: Call new Win32 API SetThreadDescription in os::set_native_thread_name Co-authored-by: Markus GaisBauer Reviewed-by: stuefe, luhenry - 8268626: Remove native pre-jdk9 support for jtreg failure handler Reviewed-by: erikj - 8268699: Shenandoah: Add test for JDK-8268127 Reviewed-by: rkennke - Merge Reviewed-by: dcubed - 8262731: [macOS] Exception from "Printable.print" is swallowed during "PrinterJob.print" Reviewed-by: prr - 8267579: Thread::cooked_allocated_bytes() hits assert(left >= right) failed: avoid underflow Reviewed-by: dcubed, stefank, kbarrett - 8266791: Annotation property which is compiled as an array property but changed to a single element throws NullPointerException Reviewed-by: darcy, jfranck - ... and 15 more: https://git.openjdk.java.net/jdk/compare/6da37cd0...e748b877 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4499/files - new: https://git.openjdk.java.net/jdk/pull/4499/files/e748b877..e748b877 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4499&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4499&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/4499.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4499/head:pull/4499 PR: https://git.openjdk.java.net/jdk/pull/4499 From jwilhelm at openjdk.java.net Tue Jun 15 22:49:41 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 15 Jun 2021 22:49:41 GMT Subject: Integrated: Merge jdk17 In-Reply-To: References: Message-ID: On Tue, 15 Jun 2021 21:51:33 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: e0f6f70d Author: Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/e0f6f70d3f9e748d2bc53f371beca487e9343d4a Stats: 1606 lines in 62 files changed: 1180 ins; 181 del; 245 mod Merge ------------- PR: https://git.openjdk.java.net/jdk/pull/4499 From wetmore at openjdk.java.net Wed Jun 16 16:24:16 2021 From: wetmore at openjdk.java.net (Bradford Wetmore) Date: Wed, 16 Jun 2021 16:24:16 GMT Subject: [jdk17] RFR: 8268901: JDK-8268768 missed removing two files Message-ID: JDK-8268768 reverted a couple putbacks that changed the way the idea projects are generated. Two new template files from JDK-8267706 were missed, and will be removed in this fix. See original bug for further details. ------------- Commit messages: - 8268901: JDK-8268768 missed removing two files Changes: https://git.openjdk.java.net/jdk17/pull/82/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=82&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8268901 Stats: 23 lines in 2 files changed: 0 ins; 23 del; 0 mod Patch: https://git.openjdk.java.net/jdk17/pull/82.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/82/head:pull/82 PR: https://git.openjdk.java.net/jdk17/pull/82 From mcimadamore at openjdk.java.net Wed Jun 16 16:53:46 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Wed, 16 Jun 2021 16:53:46 GMT Subject: [jdk17] RFR: 8268901: JDK-8268768 missed removing two files In-Reply-To: References: Message-ID: <3NG758eCYUb2WBw8aGyNNLRAJqVEJddZCmrZgLXCeOo=.f09b373f-7165-4a98-b510-13456eb5114a@github.com> On Wed, 16 Jun 2021 16:16:51 GMT, Bradford Wetmore wrote: > JDK-8268768 reverted a couple putbacks that changed the way the idea projects are generated. > > Two new template files from JDK-8267706 were missed, and will be removed in this fix. > > See original bug for further details. Looks good! ------------- Marked as reviewed by mcimadamore (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/82 From wetmore at openjdk.java.net Wed Jun 16 17:02:40 2021 From: wetmore at openjdk.java.net (Bradford Wetmore) Date: Wed, 16 Jun 2021 17:02:40 GMT Subject: [jdk17] Integrated: 8268901: JDK-8268768 missed removing two files In-Reply-To: References: Message-ID: On Wed, 16 Jun 2021 16:16:51 GMT, Bradford Wetmore wrote: > JDK-8268768 reverted a couple putbacks that changed the way the idea projects are generated. > > Two new template files from JDK-8267706 were missed, and will be removed in this fix. > > See original bug for further details. This pull request has now been integrated. Changeset: 38dbe05e Author: Bradford Wetmore URL: https://git.openjdk.java.net/jdk17/commit/38dbe05e004a018c810e3acaae4660c69dd982da Stats: 23 lines in 2 files changed: 0 ins; 23 del; 0 mod 8268901: JDK-8268768 missed removing two files Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.java.net/jdk17/pull/82 From jwilhelm at openjdk.java.net Thu Jun 17 00:57:15 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Thu, 17 Jun 2021 00:57:15 GMT Subject: RFR: Merge jdk17 Message-ID: Forwardport JDK 17 -> JDK 18 ------------- Commit messages: - Merge - 8260194: Update the documentation for -Xcheck:jni - 8268863: ProblemList serviceability/sa/TestJmapCoreMetaspace.java on linux-x64 with ZGC - 8268909: ProblemList jdk/jfr/api/consumer/streaming/TestLatestEvent.java on win-x64 - 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test - 8268774: Residual logging output written to STDOUT, not STDERR - 8268714: [macos-aarch64] 7 java/net/httpclient/websocket tests failed - 8268901: JDK-8268768 missed removing two files - 8256934: C2: assert(C->live_nodes() <= C->max_node_limit()) failed: Live Node limit exceeded limit - 8268861: Disable Windows-Aarch64 build in GitHub Actions - ... and 4 more: https://git.openjdk.java.net/jdk/compare/02c9bf08...c47ba95e The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/jdk/pull/4514/files Stats: 659 lines in 33 files changed: 450 ins; 121 del; 88 mod Patch: https://git.openjdk.java.net/jdk/pull/4514.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4514/head:pull/4514 PR: https://git.openjdk.java.net/jdk/pull/4514 From jwilhelm at openjdk.java.net Thu Jun 17 01:11:25 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Thu, 17 Jun 2021 01:11:25 GMT Subject: RFR: Merge jdk17 [v2] In-Reply-To: References: Message-ID: > Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 35 additional commits since the last revision: - Merge - 8268852: AsyncLogWriter should not overide is_Named_thread() Reviewed-by: dholmes, ysuenaga - 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test Reviewed-by: xuelei - 8259066: Obsolete -XX:+AlwaysLockClassLoader Reviewed-by: hseigel - 8268778: CDS check_excluded_classes needs DumpTimeTable_lock Reviewed-by: ccheung, minqi - 8267752: KVHashtable doesn't deallocate entries Reviewed-by: iklam, stuefe - 8267870: Remove unnecessary char_converter during class loading Reviewed-by: dholmes, iklam - 8268078: ClassListParser::_interfaces should be freed Reviewed-by: minqi, iklam, coleenp - 8268780: Use 'print_cr' instead of 'print' for the message 'eliminated ' Reviewed-by: cjplummer, zgu, dcubed - Merge - ... and 25 more: https://git.openjdk.java.net/jdk/compare/fdaabfed...c47ba95e ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4514/files - new: https://git.openjdk.java.net/jdk/pull/4514/files/c47ba95e..c47ba95e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4514&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4514&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/4514.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4514/head:pull/4514 PR: https://git.openjdk.java.net/jdk/pull/4514 From jwilhelm at openjdk.java.net Thu Jun 17 01:11:26 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Thu, 17 Jun 2021 01:11:26 GMT Subject: Integrated: Merge jdk17 In-Reply-To: References: Message-ID: On Thu, 17 Jun 2021 00:49:27 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: 3637e50b Author: Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/3637e50b30e92538510c1a8e8893cedc3bd4ccd5 Stats: 659 lines in 33 files changed: 450 ins; 121 del; 88 mod Merge ------------- PR: https://git.openjdk.java.net/jdk/pull/4514 From fdesu at protonmail.com Tue Jun 29 15:51:40 2021 From: fdesu at protonmail.com (Sergei Ustimenko) Date: Tue, 29 Jun 2021 15:51:40 +0000 Subject: Intellij project with idea.sh Message-ID: Hi, I had a small, perhaps even dummy, question about idea.sh and current version of Intellij and how to configure it for the core-libs source tree. It is very nice that there is a script to generate an idea project - it really saves a lot of time. I followed instructions https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-January/000059.html from Maurizio, though when I generate the project, I get following: - all the classes in all modules are excluded from compilation (not sure if this is intended or not; all the classes' and source folders' icons in the project view have a tiny cross in the left upper corner). - sdk is missing (but I, of course, can add it very easily - the one from the build/ folder) - there are classes in core-libs that don't have access to certain packages from other modules e.g. jdk.internal.net.http.HttpRequestBuilderImpl can't access HttpHeadersBuilder because of the following problem: "Package 'jdk.internal.net.http.common' is declared in module 'java.net.http', which does not export it to the unnamed module". Ide highlights all such occurrences red although it indexes them and I can jump to them. I can add it these modules manually but I don't think it the best way to move forward. I am not sure if I'm missing anything or doing something wrong but could you please guide me a bit or point in the right direction how can I set up Intellij Idea to work with core-libs properly. I don't really want my setup to backfire. I use Intellij Idea 2021.1.2, ant-1.10.10 to run idea.sh and openjdk build with make works fine for me. Thanks, Sergei From maurizio.cimadamore at oracle.com Tue Jun 29 16:13:21 2021 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Tue, 29 Jun 2021 17:13:21 +0100 Subject: Intellij project with idea.sh In-Reply-To: References: Message-ID: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> Hi, thanks for trying the script and report back! Some comments inline: On 29/06/2021 16:51, Sergei Ustimenko wrote: > Hi, > > I had a small, perhaps even dummy, question about idea.sh and current version of Intellij and how > to configure it for the core-libs source tree. > > It is very nice that there is a script to generate an idea project - it really saves a lot of time. > I followed instructions https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-January/000059.html > from Maurizio, though when I generate the project, I get following: > - all the classes in all modules are excluded from compilation (not sure if this is intended or not; > all the classes' and source folders' icons in the project view have a tiny cross in the left upper corner). This is intended - otherwise IntelliJ would try to build these classes itself (w/o using make - which won't work) > - sdk is missing (but I, of course, can add it very easily - the one from the build/ folder) That's also intended - I have not find a way to set up a project-wide SDK which can be configured from command line. SDKs are a global setting in IntelliJ. > - there are classes in core-libs that don't have access to certain packages from other modules > e.g. jdk.internal.net.http.HttpRequestBuilderImpl can't access HttpHeadersBuilder because of > the following problem: "Package 'jdk.internal.net.http.common' is declared in module > 'java.net.http', which does not export it to the unnamed module". Ide highlights all such occurrences > red although it indexes them and I can jump to them. I can add it these modules manually but I don't > think it the best way to move forward. Uhmmm - I can't seem to be able to reproduce this one, but occasionally I did witness something similar. Have you tried updating your SDK to something more recent?? E.g is it possible that the SDK you are using is old-ish (e.g. Java 16 or something?) Thanks Maurizio > > I am not sure if I'm missing anything or doing something wrong but could you please guide me > a bit or point in the right direction how can I set up Intellij Idea to work with core-libs properly. > I don't really want my setup to backfire. > > I use Intellij Idea 2021.1.2, ant-1.10.10 to run idea.sh and openjdk build with make works fine for me. > > Thanks, > Sergei From fdesu at protonmail.com Tue Jun 29 19:15:14 2021 From: fdesu at protonmail.com (Sergei Ustimenko) Date: Tue, 29 Jun 2021 19:15:14 +0000 Subject: Intellij project with idea.sh In-Reply-To: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> Message-ID: Hi Maurizio, Thanks for the quick reply! Thanks, now I see that excluding the classes and no SDK in the beginning are by design. It seems that I've solved the problem: I do use the latest built version of the SDK i.e. 18 (as well as openjdk-16), the problem in my case with modules was that I had to set the language level to (in my case) "16 Sealed Types" or to "X - experimental features". It was (I think) malformed, so when I switched it to "16" and then to "X" then it worked. With a small note that in .idea/misc.xml it is still: ... Though, problems with modules are not visible now - hope it helps others. I've seen there is a documentation placeholder for IDE support for Java code in doc/ide.md. Is it something that we could update to reflect steps for Intellij for Java, what do you think? Cheers, Sergei Sent with ProtonMail Secure Email. ??????? Original Message ??????? On Tuesday, June 29th, 2021 at 18:13, Maurizio Cimadamore wrote: > Hi, > > thanks for trying the script and report back! Some comments inline: > > On 29/06/2021 16:51, Sergei Ustimenko wrote: > > > Hi, > > > > I had a small, perhaps even dummy, question about idea.sh and current version of Intellij and how > > > > to configure it for the core-libs source tree. > > > > It is very nice that there is a script to generate an idea project - it really saves a lot of time. > > > > I followed instructions https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-January/000059.html > > > > from Maurizio, though when I generate the project, I get following: > > > > - all the classes in all modules are excluded from compilation (not sure if this is intended or not; > > > > all the classes' and source folders' icons in the project view have a tiny cross in the left upper corner). > > This is intended - otherwise IntelliJ would try to build these classes > > itself (w/o using make - which won't work) > > > - sdk is missing (but I, of course, can add it very easily - the one from the build/ folder) > > That's also intended - I have not find a way to set up a project-wide > > SDK which can be configured from command line. SDKs are a global setting > > in IntelliJ. > > > - there are classes in core-libs that don't have access to certain packages from other modules > > > > e.g. jdk.internal.net.http.HttpRequestBuilderImpl can't access HttpHeadersBuilder because of > > > > the following problem: "Package 'jdk.internal.net.http.common' is declared in module > > > > 'java.net.http', which does not export it to the unnamed module". Ide highlights all such occurrences > > > > red although it indexes them and I can jump to them. I can add it these modules manually but I don't > > > > think it the best way to move forward. > > Uhmmm - I can't seem to be able to reproduce this one, but occasionally > > I did witness something similar. Have you tried updating your SDK to > > something more recent?? E.g is it possible that the SDK you are using is > > old-ish (e.g. Java 16 or something?) > > Thanks > > Maurizio > > > I am not sure if I'm missing anything or doing something wrong but could you please guide me > > > > a bit or point in the right direction how can I set up Intellij Idea to work with core-libs properly. > > > > I don't really want my setup to backfire. > > > > I use Intellij Idea 2021.1.2, ant-1.10.10 to run idea.sh and openjdk build with make works fine for me. > > > > Thanks, > > > > Sergei From maurizio.cimadamore at oracle.com Tue Jun 29 20:32:25 2021 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Tue, 29 Jun 2021 21:32:25 +0100 Subject: Intellij project with idea.sh In-Reply-To: References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> Message-ID: <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> On 29/06/2021 20:15, Sergei Ustimenko wrote: > Hi Maurizio, > > Thanks for the quick reply! > Thanks, now I see that excluding the classes and no SDK in the beginning are by design. > > It seems that I've solved the problem: I do use the latest built version of the SDK i.e. 18 > (as well as openjdk-16), the problem in my case with modules was that I had to set the > language level to (in my case) "16 Sealed Types" or to "X - experimental features". > It was (I think) malformed, so when I switched it to "16" and then to "X" then it worked. Yeah - that sometimes creates issues as well, I had not time to investigate why exactly. > With a small note that in .idea/misc.xml it is still: > > ... > > Though, problems with modules are not visible now - hope it helps others. We could try to fix the template to point at "X level" - perhaps that might work, yes. > > I've seen there is a documentation placeholder for IDE support for Java code in doc/ide.md. Is it > something that we could update to reflect steps for Intellij for Java, what do you think? ide.md is a good place where to put documentation regarding IDE support (AFAIK, right now it mostly documents steps on how to work with JVM code). Maurizio > > Cheers, > Sergei > > Sent with ProtonMail Secure Email. > > ??????? Original Message ??????? > > On Tuesday, June 29th, 2021 at 18:13, Maurizio Cimadamore wrote: > >> Hi, >> >> thanks for trying the script and report back! Some comments inline: >> >> On 29/06/2021 16:51, Sergei Ustimenko wrote: >> >>> Hi, >>> >>> I had a small, perhaps even dummy, question about idea.sh and current version of Intellij and how >>> >>> to configure it for the core-libs source tree. >>> >>> It is very nice that there is a script to generate an idea project - it really saves a lot of time. >>> >>> I followed instructions https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-January/000059.html >>> >>> from Maurizio, though when I generate the project, I get following: >>> >>> - all the classes in all modules are excluded from compilation (not sure if this is intended or not; >>> >>> all the classes' and source folders' icons in the project view have a tiny cross in the left upper corner). >> This is intended - otherwise IntelliJ would try to build these classes >> >> itself (w/o using make - which won't work) >> >>> - sdk is missing (but I, of course, can add it very easily - the one from the build/ folder) >> That's also intended - I have not find a way to set up a project-wide >> >> SDK which can be configured from command line. SDKs are a global setting >> >> in IntelliJ. >> >>> - there are classes in core-libs that don't have access to certain packages from other modules >>> >>> e.g. jdk.internal.net.http.HttpRequestBuilderImpl can't access HttpHeadersBuilder because of >>> >>> the following problem: "Package 'jdk.internal.net.http.common' is declared in module >>> >>> 'java.net.http', which does not export it to the unnamed module". Ide highlights all such occurrences >>> >>> red although it indexes them and I can jump to them. I can add it these modules manually but I don't >>> >>> think it the best way to move forward. >> Uhmmm - I can't seem to be able to reproduce this one, but occasionally >> >> I did witness something similar. Have you tried updating your SDK to >> >> something more recent?? E.g is it possible that the SDK you are using is >> >> old-ish (e.g. Java 16 or something?) >> >> Thanks >> >> Maurizio >> >>> I am not sure if I'm missing anything or doing something wrong but could you please guide me >>> >>> a bit or point in the right direction how can I set up Intellij Idea to work with core-libs properly. >>> >>> I don't really want my setup to backfire. >>> >>> I use Intellij Idea 2021.1.2, ant-1.10.10 to run idea.sh and openjdk build with make works fine for me. >>> >>> Thanks, >>> >>> Sergei From fdesu at protonmail.com Wed Jun 30 08:30:18 2021 From: fdesu at protonmail.com (Sergei Ustimenko) Date: Wed, 30 Jun 2021 08:30:18 +0000 Subject: Intellij project with idea.sh In-Reply-To: <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> Message-ID: <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> Hi Maurizio, I've prepared a tiny patch to address the language level issue in the misc.xml and wanted to know your opinion before submitting any PR. There are two xmls that I've updated: one in /make/ide/idea/jdk/template/ and another in /make/ide/idea/langtools/template/. If the second one is not needed (I haven't found any references to it) I can remove it from the patch. Happy to hear your feedback. Thanks, Sergei The patch is inlined: diff --git a/make/ide/idea/jdk/template/misc.xml b/make/ide/idea/jdk/template/misc.xml index 669c382327a..48600125348 100644 --- a/make/ide/idea/jdk/template/misc.xml +++ b/make/ide/idea/jdk/template/misc.xml @@ -12,7 +12,7 @@ - + diff --git a/make/ide/idea/langtools/template/misc.xml b/make/ide/idea/langtools/template/misc.xml index c2121cda146..dca7ff8abe7 100644 --- a/make/ide/idea/langtools/template/misc.xml +++ b/make/ide/idea/langtools/template/misc.xml @@ -12,7 +12,7 @@ - + ??????? Original Message ??????? On Tuesday, June 29th, 2021 at 22:32, Maurizio Cimadamore wrote: > On 29/06/2021 20:15, Sergei Ustimenko wrote: > > > Hi Maurizio, > > > > Thanks for the quick reply! > > > > Thanks, now I see that excluding the classes and no SDK in the beginning are by design. > > > > It seems that I've solved the problem: I do use the latest built version of the SDK i.e. 18 > > > > (as well as openjdk-16), the problem in my case with modules was that I had to set the > > > > language level to (in my case) "16 Sealed Types" or to "X - experimental features". > > > > It was (I think) malformed, so when I switched it to "16" and then to "X" then it worked. > > Yeah - that sometimes creates issues as well, I had not time to > > investigate why exactly. > > > With a small note that in .idea/misc.xml it is still: > > > > > > > > ... > > > > > > > > Though, problems with modules are not visible now - hope it helps others. > > We could try to fix the template to point at "X level" - perhaps that > > might work, yes. > > > I've seen there is a documentation placeholder for IDE support for Java code in doc/ide.md. Is it > > > > something that we could update to reflect steps for Intellij for Java, what do you think? > > ide.md is a good place where to put documentation regarding IDE support > > (AFAIK, right now it mostly documents steps on how to work with JVM code). > > Maurizio > From maurizio.cimadamore at oracle.com Wed Jun 30 10:30:36 2021 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Wed, 30 Jun 2021 11:30:36 +0100 Subject: Intellij project with idea.sh In-Reply-To: <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> Message-ID: <9336be77-a156-9d8f-dda5-f0ae0c5e5e25@oracle.com> This looks good to me. For langtools, we ideally like JDK_X minus one :-) - but that's impossible to do. Also there are parts of langtools such as jshell, javadoc, javap which are allowed to use latest features. The problem is really only javac, but javac developers know well to stay clear of shiny new language features anyway :-) Thanks Maurizio On 30/06/2021 09:30, Sergei Ustimenko wrote: > Hi Maurizio, > > I've prepared a tiny patch to address the language level issue in the misc.xml > and wanted to know your opinion before submitting any PR. There are two xmls that > I've updated: one in /make/ide/idea/jdk/template/ and another in > /make/ide/idea/langtools/template/. If the second one is not needed (I haven't found > any references to it) I can remove it from the patch. > > Happy to hear your feedback. > > Thanks, > Sergei > > The patch is inlined: > > diff --git a/make/ide/idea/jdk/template/misc.xml b/make/ide/idea/jdk/template/misc.xml > index 669c382327a..48600125348 100644 > --- a/make/ide/idea/jdk/template/misc.xml > +++ b/make/ide/idea/jdk/template/misc.xml > @@ -12,7 +12,7 @@ > > > > - > + > > > > diff --git a/make/ide/idea/langtools/template/misc.xml b/make/ide/idea/langtools/template/misc.xml > index c2121cda146..dca7ff8abe7 100644 > --- a/make/ide/idea/langtools/template/misc.xml > +++ b/make/ide/idea/langtools/template/misc.xml > @@ -12,7 +12,7 @@ > > > > - > + > > > > > > > ??????? Original Message ??????? > > On Tuesday, June 29th, 2021 at 22:32, Maurizio Cimadamore wrote: > >> On 29/06/2021 20:15, Sergei Ustimenko wrote: >> >>> Hi Maurizio, >>> >>> Thanks for the quick reply! >>> >>> Thanks, now I see that excluding the classes and no SDK in the beginning are by design. >>> >>> It seems that I've solved the problem: I do use the latest built version of the SDK i.e. 18 >>> >>> (as well as openjdk-16), the problem in my case with modules was that I had to set the >>> >>> language level to (in my case) "16 Sealed Types" or to "X - experimental features". >>> >>> It was (I think) malformed, so when I switched it to "16" and then to "X" then it worked. >> Yeah - that sometimes creates issues as well, I had not time to >> >> investigate why exactly. >> >>> With a small note that in .idea/misc.xml it is still: >>> >>> >>> >>> ... >>> >>> >>> >>> Though, problems with modules are not visible now - hope it helps others. >> We could try to fix the template to point at "X level" - perhaps that >> >> might work, yes. >> >>> I've seen there is a documentation placeholder for IDE support for Java code in doc/ide.md. Is it >>> >>> something that we could update to reflect steps for Intellij for Java, what do you think? >> ide.md is a good place where to put documentation regarding IDE support >> >> (AFAIK, right now it mostly documents steps on how to work with JVM code). >> >> Maurizio >> From jonathan.gibbons at oracle.com Wed Jun 30 15:42:03 2021 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Wed, 30 Jun 2021 08:42:03 -0700 Subject: Intellij project with idea.sh In-Reply-To: <9336be77-a156-9d8f-dda5-f0ae0c5e5e25@oracle.com> References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> <9336be77-a156-9d8f-dda5-f0ae0c5e5e25@oracle.com> Message-ID: <04ee444d-460d-757b-9e22-14c656c4daa7@oracle.com> I believe most of LangTools is subject to the JDK_X - 1 requirement.? It shows up in the makefiles via the `INTERIM_*` variables. -- Jon On 6/30/21 3:30 AM, Maurizio Cimadamore wrote: > This looks good to me. For langtools, we ideally like JDK_X minus one > :-) - but that's impossible to do. Also there are parts of langtools > such as jshell, javadoc, javap which are allowed to use latest > features. The problem is really only javac, but javac developers know > well to stay clear of shiny new language features anyway :-) > > Thanks > Maurizio > > On 30/06/2021 09:30, Sergei Ustimenko wrote: >> Hi Maurizio, >> >> I've prepared a tiny patch to address the language level issue in the >> misc.xml >> and wanted to know your opinion before submitting any PR. There are >> two xmls that >> I've updated: one in /make/ide/idea/jdk/template/ and another in >> /make/ide/idea/langtools/template/. If the second one is not needed >> (I haven't found >> any references to it) I can remove it from the patch. >> >> Happy to hear your feedback. >> >> Thanks, >> Sergei >> >> The patch is inlined: >> >> diff --git a/make/ide/idea/jdk/template/misc.xml >> b/make/ide/idea/jdk/template/misc.xml >> index 669c382327a..48600125348 100644 >> --- a/make/ide/idea/jdk/template/misc.xml >> +++ b/make/ide/idea/jdk/template/misc.xml >> @@ -12,7 +12,7 @@ >> ??????? > file="file://###ROOT_DIR###/make/ide/idea/jdk/build.xml" >> name="images" /> >> ????? >> ??? >> -? > languageLevel="JDK_16" assert-keyword="true" jdk-15="true"> >> +? > languageLevel="JDK_X" assert-keyword="true" project-jdk-type="JavaSDK"> >> ????? >> ??? >> ? >> diff --git a/make/ide/idea/langtools/template/misc.xml >> b/make/ide/idea/langtools/template/misc.xml >> index c2121cda146..dca7ff8abe7 100644 >> --- a/make/ide/idea/langtools/template/misc.xml >> +++ b/make/ide/idea/langtools/template/misc.xml >> @@ -12,7 +12,7 @@ >> ??????? > file="file://$PROJECT_DIR$/make/ide/idea/langtools/build.xml" >> name="build-all-classes" /> >> ????? >> ??? >> -? > languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" >> project-jdk-name="1.8" project-jdk-type="JavaSDK"> >> +? > languageLevel="JDK_X" assert-keyword="true" project-jdk-type="JavaSDK"> >> ????? >> ??? >> ? >> >> >> >> ??????? Original Message ??????? >> >> On Tuesday, June 29th, 2021 at 22:32, Maurizio Cimadamore >> wrote: >> >>> On 29/06/2021 20:15, Sergei Ustimenko wrote: >>> >>>> Hi Maurizio, >>>> >>>> Thanks for the quick reply! >>>> >>>> Thanks, now I see that excluding the classes and no SDK in the >>>> beginning are by design. >>>> >>>> It seems that I've solved the problem: I do use the latest built >>>> version of the SDK i.e. 18 >>>> >>>> (as well as openjdk-16), the problem in my case with modules was >>>> that I had to set the >>>> >>>> language level to (in my case) "16 Sealed Types" or to "X - >>>> experimental features". >>>> >>>> It was (I think) malformed, so when I switched it to "16" and then >>>> to "X" then it worked. >>> Yeah - that sometimes creates issues as well, I had not time to >>> >>> investigate why exactly. >>> >>>> With a small note that in .idea/misc.xml it is still: >>>> >>>> >>> languageLevel="JDK_16_PREVIEW" ... project-jdk-name="18-ea" >>>> project-jdk-type="JavaSDK"> >>>> >>>> ... >>>> >>>> >>>> >>>> Though, problems with modules are not visible now - hope it helps >>>> others. >>> We could try to fix the template to point at "X level" - perhaps that >>> >>> might work, yes. >>> >>>> I've seen there is a documentation placeholder for IDE support for >>>> Java code in doc/ide.md. Is it >>>> >>>> something that we could update to reflect steps for Intellij for >>>> Java, what do you think? >>> ide.md is a good place where to put documentation regarding IDE support >>> >>> (AFAIK, right now it mostly documents steps on how to work with JVM >>> code). >>> >>> Maurizio >>> From fdesu at protonmail.com Wed Jun 30 17:16:32 2021 From: fdesu at protonmail.com (Sergei Ustimenko) Date: Wed, 30 Jun 2021 17:16:32 +0000 Subject: Intellij project with idea.sh In-Reply-To: <04ee444d-460d-757b-9e22-14c656c4daa7@oracle.com> References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> <9336be77-a156-9d8f-dda5-f0ae0c5e5e25@oracle.com> <04ee444d-460d-757b-9e22-14c656c4daa7@oracle.com> Message-ID: Hi Jon, Agree, taking this into account and what Maurizio says, maybe it's worth to hardcode the language level in make/ide/idea/langtools/template/misc.xml to JDK_16 [1]. This way it is still easy to maintain and misc.xml in make/ide/idea/jdk/template still has JDK_X. What do you think? In the meantime, I would be grateful if someone can sponsor the change and create a JBS issue to track efforts. I will need it later to link a PR. Thanks, Sergei [1] - https://github.com/JetBrains/intellij-community/blob/master/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java#L24 Sent with ProtonMail Secure Email. ??????? Original Message ??????? On Wednesday, June 30th, 2021 at 17:42, Jonathan Gibbons wrote: > I believe most of LangTools is subject to the JDK_X - 1 requirement.? It > > shows up in the makefiles via the `INTERIM_*` variables. > > -- Jon From maurizio.cimadamore at oracle.com Wed Jun 30 20:41:35 2021 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Wed, 30 Jun 2021 21:41:35 +0100 Subject: Intellij project with idea.sh In-Reply-To: References: <7a4795e9-ad54-6335-cc98-a2762f90d1e2@oracle.com> <101ac3e1-c4c1-a8bd-5a6f-811de35c3644@oracle.com> <5qOfJpS5xEID_6MCSP5_u2qUm_8j2GLytEBrfV3e-1evOgCYrIsbJJEFtXEushnCM74jgMYUNT2pPYJzegfbiIzuW4ws4yaKF1Wyp0wHJmQ=@protonmail.com> <9336be77-a156-9d8f-dda5-f0ae0c5e5e25@oracle.com> <04ee444d-460d-757b-9e22-14c656c4daa7@oracle.com> Message-ID: Hi Sergei, I'm ok with only fixing the JDK part, although I think from a practical point of view, having JDK_X on both could avoid issues with project templates becoming too obsolete. But let's leave the langtools project for later. Here's the issue: https://bugs.openjdk.java.net/browse/JDK-8269700 I'm happy to sponsor the PR. Cheers Maurizio On 30/06/2021 18:16, Sergei Ustimenko wrote: > Hi Jon, > > Agree, taking this into account and what Maurizio says, maybe it's worth to > hardcode the language level in make/ide/idea/langtools/template/misc.xml to > JDK_16 [1]. This way it is still easy to maintain and misc.xml in > make/ide/idea/jdk/template still has JDK_X. What do you think? > > In the meantime, I would be grateful if someone can sponsor the change and > create a JBS issue to track efforts. I will need it later to link a PR. > > Thanks, > Sergei > > > [1] - https://github.com/JetBrains/intellij-community/blob/master/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java#L24 > > Sent with ProtonMail Secure Email. > > ??????? Original Message ??????? > > On Wednesday, June 30th, 2021 at 17:42, Jonathan Gibbons wrote: > >> I believe most of LangTools is subject to the JDK_X - 1 requirement.? It >> >> shows up in the makefiles via the `INTERIM_*` variables. >> >> -- Jon From github.com+5709644+fdesu at openjdk.java.net Wed Jun 30 21:02:14 2021 From: github.com+5709644+fdesu at openjdk.java.net (Sergei Ustimenko) Date: Wed, 30 Jun 2021 21:02:14 GMT Subject: RFR: 8269700: source level for IntelliJ JDK project is set incorrectly Message-ID: After generating an Intellij project with the `idea.sh` script, IDEA might get confused with the language level settings in generated .idea/misc.xml. This results in a problem with modules discussed in https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-June/000082.html. To mitigate the problem changing the project's language level helps. This patch sets language level for jdk and langtools projects to [X (Experimental Features)](https://github.com/JetBrains/intellij-community/blob/master/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java) to avoid such problems. As a side effect following term needs to be accepted in IDEA once opening the project for the first time: You must accept the terms of legal notice of the beta Java specification to enable support for "X - Experimental features". The implementation of an early-draft specification developed under the Java Community Process (JCP) is made available for testing and evaluation purposes only and is not compatible with any specification of the JCP. ------------- Commit messages: - 8269700: source level for IntelliJ JDK project is set incorrectly Changes: https://git.openjdk.java.net/jdk/pull/4634/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4634&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8269700 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4634.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4634/head:pull/4634 PR: https://git.openjdk.java.net/jdk/pull/4634