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

Upgrade Xtext to 2.17 for full Java 11 support #650

Merged
merged 3 commits into from
Mar 15, 2019

Conversation

wborn
Copy link
Member

@wborn wborn commented Mar 13, 2019

This is a PR to upgrade Xtext to 2.17 (#646). The PR already builds successfully on Java 8 and on Java 11 it now builds 105/127 projects. :-)

I haven't tested the end result yet but maybe you can see if all the upgraded dependencies/features make some sense @maggu2810 / @kaikreuzer?

The Java 11 build now fails with:

[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.2.0:site (default-cli) on project org.openhab.core.features.p2.repo: Execution default-cli of goal org.reficio:p2-maven-plugin:1.2.0:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: P2 publisher return code was 13 -> [Help 1]

Fixes #646

@wborn wborn added work in progress A PR that is not yet ready to be merged infrastructure labels Mar 13, 2019
@wborn wborn force-pushed the upgrade-xtext-for-java-11 branch from 08c8da4 to 7c36fda Compare March 13, 2019 23:01
@wborn
Copy link
Member Author

wborn commented Mar 14, 2019

Upgrading the p2-maven-plugin to 1.3.0 fixed that new Java 11 error. There seem to be some tests failing on Java 11 now. It looks precision related:

TEST serializationTestZoned[16](org.eclipse.smarthome.core.library.types.DateTimeTypeTest) <<< ERROR: expected:<2019-03-13T23:13:15.976658Z> but was:<2019-03-13T23:13:15.976Z>
java.lang.AssertionError: expected:<2019-03-13T23:13:15.976658Z> but was:<2019-03-13T23:13:15.976Z>

When building openhab2-addons using a local build of openhab-core and this PR there's an error where the build cannot find the new artifacts:

[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.40/ (172B)
[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.40/ (172B)
[INFO] Adding repository https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.40

...

[INFO] Resolving dependencies of MavenProject: org.openhab.binding:org.openhab.binding.plclogo:2.5.0-SNAPSHOT @ /home/wouter/git/openhab/openhab2-addons/addons/binding/org.openhab.binding.plclogo/pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.openhab.binding.plclogo 2.5.0.qualifier
[ERROR]   Missing requirement: org.openhab.core.model.item 2.5.0.201903132304 requires 'osgi.bundle; org.eclipse.xtext.xbase.lib 2.17.0' but it could not be found
[ERROR]   Cannot satisfy dependency: org.openhab.binding.plclogo 2.5.0.qualifier depends on: java.package; org.eclipse.smarthome.model.script.actions 0.0.0
[ERROR]   Cannot satisfy dependency: org.openhab.core.model.script 2.5.0.201903132303 depends on: osgi.bundle; org.openhab.core.model.item 0.0.0
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: org.openhab.binding:org.openhab.binding.plclogo:2.5.0-SNAPSHOT @ /home/wouter/git/openhab/openhab2-addons/addons/binding/org.openhab.binding.plclogo/pom.xml: See log for details -> [Help 1]

That is to be expected I think because they need to be added to a new openhab-deps-repo version? Is there an easy way to workaround this and test if all works well?

@maggu2810
Copy link
Contributor

You could use the runtime BOM as a dependency then everything should be able to resolved by the POM considered dependencies. But it will slow down the whole build.

@wborn wborn removed the work in progress A PR that is not yet ready to be merged label Mar 14, 2019
@wborn wborn changed the title [WIP] Upgrade Xtext to 2.17 for full Java 11 support Upgrade Xtext to 2.17 for full Java 11 support Mar 14, 2019
@wborn
Copy link
Member Author

wborn commented Mar 14, 2019

I managed to get my own p2 repo using Eclipse 2019-03 deployed which I could use for creating a working distro. The distro started and the demo didn't show any issues. :-)

For creating the p2 repo the changes in openhab/openhab-deps-repo#12 are required.

The bundle list reported by Karaf is available in this bundle-list.txt.

@wborn wborn requested review from maggu2810 and kaikreuzer March 14, 2019 22:19
@wborn wborn force-pushed the upgrade-xtext-for-java-11 branch from 7d41142 to fbd4ab6 Compare March 14, 2019 22:32
Copy link
Contributor

@maggu2810 maggu2810 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -42,7 +42,7 @@
<groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version>
<groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version>

<ohdr.version>1.0.40</ohdr.version>
<ohdr.version>1.0.41</ohdr.version>
Copy link
Contributor

@maggu2810 maggu2810 Mar 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge as soon as @kaikreuzer informs us that ohdr 1.0.41 is published.

I assume I can wait for a notification that the respective pull request you created is merged.
Is it enough to wait for a new build of https://ci.openhab.org/job/openHAB-Deps-Repo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right! I studied how it all works for creating my own P2 repo. ;-) As a sanity check you can also check that the new version is available at the OH P2 bintray repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has automatically been published by running https://ci.openhab.org/job/openHAB-Deps-Repo/48/.

@kaikreuzer kaikreuzer merged commit 2c7ca34 into openhab:master Mar 15, 2019
@wborn wborn deleted the upgrade-xtext-for-java-11 branch March 15, 2019 08:28
@wborn wborn added this to the 2.5 milestone Jul 30, 2019
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
* Upgrade Xtext to 2.17 for full Java 11 support

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 2c7ca34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Xtext to 2.17 for full Java 11 support
3 participants