Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8347825: Make IDEA ide support use proper build system mechanisms #23140

Closed
wants to merge 2 commits into from

Conversation

magicus
Copy link
Member

@magicus magicus commented Jan 15, 2025

The idea.sh script which creates a configuration for IDEA does at some point call a makefile, to extract information from the build system. However, this is done in an ad-hoc manner that does not fit properly in the build system.

I ran into this as a problem when trying to implement another change, so this needs to be fixed, and should be fixed separately.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8347825: Make IDEA ide support use proper build system mechanisms (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23140/head:pull/23140
$ git checkout pull/23140

Update a local copy of the PR:
$ git checkout pull/23140
$ git pull https://git.openjdk.org/jdk.git pull/23140/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23140

View PR using the GUI difftool:
$ git pr show -t 23140

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23140.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 15, 2025

👋 Welcome back ihse! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@magicus
Copy link
Member Author

magicus commented Jan 15, 2025

@mcimadamore Can you please verify that the IDEA generation still works properly? I've tried it locally and it seems fine to me, but I'd like you to verify it as well.

@openjdk
Copy link

openjdk bot commented Jan 15, 2025

@magicus This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8347825: Make IDEA ide support use proper build system mechanisms

Reviewed-by: mcimadamore, erikj

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 17 new commits pushed to the master branch:

  • 8bfa540: 8347731: Replace SIZE_FORMAT in zgc
  • cbe2f96: 8347732: Replace SIZE_FORMAT in shenandoah
  • f64f22b: 8346107: Generators: testing utility for random value generation
  • 4ad5d55: 8325030: PhaseMacroExpand::value_from_mem_phi assert with "unknown node on this path"
  • 24de9de: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML
  • d23ad01: 8337978: Verify OopHandles oops on access
  • 9c430c9: 8336920: ArithmeticException in javax.sound.sampled.AudioInputStream
  • bdf6e63: 8347431: Update ObjectMonitor comments
  • 764d70b: 8344049: Shenandoah: Eliminate init-update-refs safepoint
  • cfe70eb: 8342550: Log warning for using JDK1.1 compatible time zone IDs for future removal
  • ... and 7 more: https://git.openjdk.org/jdk/compare/7df21a8f09ab606f38a44d84d841d4bba9f09adf...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 15, 2025
@openjdk
Copy link

openjdk bot commented Jan 15, 2025

@magicus The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • ide-support

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Jan 15, 2025

Webrevs

@magicus
Copy link
Member Author

magicus commented Jan 15, 2025

Turns out we actually did have a make:idea test, and running it showed a mistake in my code! Who would have thought..? 😄

@mcimadamore
Copy link
Contributor

@mcimadamore Can you please verify that the IDEA generation still works properly? I've tried it locally and it seems fine to me, but I'd like you to verify it as well.

I will take a look. Thanks for the headsup. We should probably also ask somebody with Windows (@JornVernee ?)

@TheShermanTanker
Copy link
Contributor

We should probably also ask somebody with Windows

Hey, don't forget about me! How do I test this, just set up an IDEA Workspace as instructed in the docs?

@mcimadamore
Copy link
Contributor

mcimadamore commented Jan 15, 2025

We should probably also ask somebody with Windows

Hey, don't forget about me! How do I test this, just set up an IDEA Workspace as instructed in the docs?

Yes, that would be the case. E.g. run sh bin/idea.sh java.base or something like that (then try to open with IJ and see if that works :-) )

@JornVernee
Copy link
Member

I do see a couple of warnings being printed when I run the script:

$ bash bin/idea.sh
Note: Command line contains non-control variables:
* MODULES=
* IDEA_OUTPUT=/mnt/h/openjdk/git-jdk2/.idea
Make sure it is not mistyped, and that you intend to override this variable.
'make help' will list known control variables.

Note: Command line contains non-control variables:
* MODULES=
* IDEA_OUTPUT=/mnt/h/openjdk/git-jdk2/.idea
Make sure it is not mistyped, and that you intend to override this variable.
'make help' will list known control variables.

Building target 'idea-gen-config' in configuration 'windows-release'
Finished building target 'idea-gen-config' in configuration 'windows-release'

Other than that, the generated project files seem to work fine.

@magicus
Copy link
Member Author

magicus commented Jan 15, 2025

Yeah.. technically it is more of a "note" than a "warning". "Make sure that you intend to override this variable" it says, and that is what I intend. If this is very annoying I figure out another way to pass this information without triggering this, but this was the simple way.

@JornVernee
Copy link
Member

I personally rarely need to run the idea.sh script. Mostly just the first time after cloning a repo. So, I don't think it matters.

@TheShermanTanker
Copy link
Contributor

I went to sleep before actually testing the change, sorry about that. Same thing that Jorn reports, it seems to work fine apart from a warning

@mcimadamore
Copy link
Contributor

Works as expected (except for the warnings). I think it's good to go, at least for the time being. I tried creating project (with java.base and jdk.compiler), tried to open files, build the jdk from the IDE and opening and run some tests using the jtreg plugin. All worked as expected.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 16, 2025
@magicus
Copy link
Member Author

magicus commented Jan 16, 2025

Thanks for the testing!

/integrate

@openjdk
Copy link

openjdk bot commented Jan 16, 2025

Going to push as commit 3b6e576.
Since your change was applied there have been 17 commits pushed to the master branch:

  • 8bfa540: 8347731: Replace SIZE_FORMAT in zgc
  • cbe2f96: 8347732: Replace SIZE_FORMAT in shenandoah
  • f64f22b: 8346107: Generators: testing utility for random value generation
  • 4ad5d55: 8325030: PhaseMacroExpand::value_from_mem_phi assert with "unknown node on this path"
  • 24de9de: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML
  • d23ad01: 8337978: Verify OopHandles oops on access
  • 9c430c9: 8336920: ArithmeticException in javax.sound.sampled.AudioInputStream
  • bdf6e63: 8347431: Update ObjectMonitor comments
  • 764d70b: 8344049: Shenandoah: Eliminate init-update-refs safepoint
  • cfe70eb: 8342550: Log warning for using JDK1.1 compatible time zone IDs for future removal
  • ... and 7 more: https://git.openjdk.org/jdk/compare/7df21a8f09ab606f38a44d84d841d4bba9f09adf...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 16, 2025
@openjdk openjdk bot closed this Jan 16, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 16, 2025
@openjdk
Copy link

openjdk bot commented Jan 16, 2025

@magicus Pushed as commit 3b6e576.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@magicus magicus deleted the fix-idea-makefile branch January 16, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants