jmc icon indicating copy to clipboard operation
jmc copied to clipboard

7526: JMC not buildable with jdk17

Open parttimenerd opened this issue 2 years ago • 16 comments

Tested on Java 11 x86 and aarch64 (azul, but only builds), and on Java 17 x86 and aarch64.


Progress

  • [x] Commit message must refer to an issue
  • [ ] Change must be properly reviewed

Issue

  • JMC-7526: JMC not buildable with jdk17

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jmc pull/363/head:pull/363
$ git checkout pull/363

Update a local copy of the PR:
$ git checkout pull/363
$ git pull https://git.openjdk.java.net/jmc pull/363/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 363

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jmc/pull/363.diff

parttimenerd avatar Jan 17 '22 16:01 parttimenerd

:wave: Welcome back parttimenerd! 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.

bridgekeeper[bot] avatar Jan 17 '22 16:01 bridgekeeper[bot]

There is a problem that I was missing in my builds. I'm working on it.

parttimenerd avatar Jan 17 '22 17:01 parttimenerd

This PR has currently a few issues (that I'm dealing with in the next few) days:

  • [ ] improve GitHub actions
  • [ ] fix spurious bug related to JDP that only happens sometimes
  • [ ] fix bug that is probably related to trying to build this on an Mac M1
  • [ ] fix ./build.sh --run to work on non x86_64 (might be a different bug)
  • [ ] fix bugs related to missing module exports

parttimenerd avatar Jan 18 '22 08:01 parttimenerd

This PR has currently a few issues (that I'm dealing with in the next few) days:

  • [ ] fix reliance on tools.jar (work with tycho to open up modules)
  • [ ] improve GitHub actions
  • [ ] fix spurious bug related to JDP that only happens sometimes
  • [ ] fix bug that is probably related to trying to build this on an Mac M1
  • [ ] fix ./build.sh --run to work on non x86_64 (might be a different bug)

Maybe it's anyway feasible/better to split up the PR into separate items...

RealCLanger avatar Jan 18 '22 09:01 RealCLanger

fix reliance on tools.jar (work with tycho to open up modules)

Since #358, Eclipse now requires Java 11. In #359, I bumped the JDK to Java 11, and dropped the JMC_JDK library (that contains tools.jar) as now these APIs live in modules (the needed package exports were already defined in the pom.xml), however I'm quite unsure about the Eclipse configuration.

fix bug that is probably related to trying to build this on an Mac M1

Could it be related to #361 ?

bric3 avatar Jan 18 '22 14:01 bric3

Could it be related to #361 ?

Yes. Switching to eclipse 4.22 is necessary to build it on Mac M1.

parttimenerd avatar Jan 18 '22 14:01 parttimenerd

It now is buildable on JDK 17 and only the apptests fail.

parttimenerd avatar Jan 20 '22 17:01 parttimenerd

I currently unable to get the tests running in eclipse (the devguide does not help), therefore no progress here.

The tests that fail, running with maven, seem to be UI related.

parttimenerd avatar Jan 31 '22 16:01 parttimenerd

The test are running on my machine, so hopefully they run in the CI as well.

parttimenerd avatar Feb 02 '22 08:02 parttimenerd

Cool, I will test and review this later. One question beforehand: Is tycho 2.6.0 available now? And if yes, did you test whether it changes something regarding the build peculiarities?

RealCLanger avatar Feb 02 '22 09:02 RealCLanger

Tycho 2.6.0 is available but it does not change anything.

parttimenerd avatar Feb 02 '22 09:02 parttimenerd

The next tycho version is properly tested with JDK 17: https://github.com/eclipse/tycho/commit/4e7ca10e61f585966a7a8091e1418cc29ac2e63d

parttimenerd avatar Mar 10 '22 14:03 parttimenerd

https://github.com/openjdk/jmc/commit/97403f7d40fae9dcea6e1aa66307f0d1c87108ce was just integrated into master which updates to latest tycho. @parttimenerd, can you update your PR to merge the changes and try to remove the workarounds?

RealCLanger avatar Apr 13 '22 08:04 RealCLanger

@parttimenerd this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout parttimenerd_java17
git fetch https://git.openjdk.java.net/jmc master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar Apr 13 '22 15:04 openjdk[bot]

Removing the workarounds does not seem to work?

parttimenerd avatar Apr 13 '22 15:04 parttimenerd

Superseded by #482.

parttimenerd avatar May 16 '23 11:05 parttimenerd