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

Update the target platform to 2024-03, Xtext 2.34, Klighd 3.0.1, and ELK 0.9.1 #65

Merged
merged 12 commits into from
Apr 26, 2024

Conversation

soerendomroes
Copy link
Contributor

@soerendomroes soerendomroes commented Apr 21, 2024

  • Fix epoch target platform
  • FIx maxos runner
  • Adapt the changes to the Eclipse setup
  • Remove runner debug settings before merging

@soerendomroes
Copy link
Contributor Author

The update to Xtext 2.34 fails here, since the xtext.sdk.feature is not present in the Eclipse 2023-12 as seen here. We should use the one from here instead.

@soerendomroes
Copy link
Contributor Author

Here is the problem that this PR currently has:

Beginning with klighd 3.0.X klighd.lsp is no longer an Eclipse plugin but is only published to maven central. Hence, the language server build should be a maven only build that does not utilize maven tycho.

@a-sr could you point me (or anyone who wants to upgrade Klighd) to your commits that implemented this change in the kieler/semantics?

@soerendomroes
Copy link
Contributor Author

Also Sprotty 0.9.0 (the last version we mirrored as a p2 update site) still depends on javax, hence, we cannot remove javax from the build just yet without adopting a different way of buildin the LS. I guess, we could also build the language server via gradle now, right?

@soerendomroes
Copy link
Contributor Author

@lhstrh Any idea why the ui tests fail for Epoch? Can you see the logs?

@soerendomroes
Copy link
Contributor Author

Log of the runner

!SESSION 2024-04-24 14:28:24.266 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.10
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties /home/sdo/Documents/eclipses/2024-04-04-lingua-franca-epoch-2-elk/git/epoch (copy)/org.lflang.ui.tests/target/surefire.properties
Command-line arguments:  -debug -consolelog -data /home/sdo/Documents/eclipses/2024-04-04-lingua-franca-epoch-2-elk/git/epoch (copy)/org.lflang.ui.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties /home/sdo/Documents/eclipses/2024-04-04-lingua-franca-epoch-2-elk/git/epoch (copy)/org.lflang.ui.tests/target/surefire.properties

!ENTRY org.eclipse.jdt.launching.macosx 4 0 2024-04-24 14:28:26.428
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jdt.launching.macosx [223]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(osgi.os=macosx)"

	at org.eclipse.osgi.container.Module.start(Module.java:493)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2073)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:143)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2064)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2004)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1967)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1883)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)

!ENTRY org.eclipse.swt.cocoa.macosx.x86_64 2 0 2024-04-24 14:28:26.469
!MESSAGE Could not resolve module: org.eclipse.swt.cocoa.macosx.x86_64 [224]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )"
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )"


!ENTRY org.eclipse.swt.cocoa.macosx.aarch64 2 0 2024-04-24 14:28:26.469
!MESSAGE Could not resolve module: org.eclipse.swt.cocoa.macosx.aarch64 [225]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=aarch64) )"
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=aarch64) )"


!ENTRY org.eclipse.jdt.launching.macosx 2 0 2024-04-24 14:28:26.470
!MESSAGE Could not resolve module: org.eclipse.jdt.launching.macosx [223]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(osgi.os=macosx)"


!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2024-04-24 14:28:26.470
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [186]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"


!ENTRY org.eclipse.tycho.surefire.junit4 2 0 2024-04-24 14:28:26.471
!MESSAGE Could not resolve module: org.eclipse.tycho.surefire.junit4 [227]
  Unresolved requirement: Import-Package: javax.annotation


!ENTRY org.eclipse.osgi 4 0 2024-04-24 14:28:26.471
!MESSAGE Application error
!STACK 1
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.ClassNotFoundException: org.apache.maven.surefire.junit4.JUnit4Provider
	at org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:249)
	at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:133)
	at org.apache.maven.surefire.booter.SurefireReflector.instantiateProvider(SurefireReflector.java:265)
	at org.apache.maven.surefire.booter.ProviderFactory.createProvider(ProviderFactory.java:118)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:83)
	at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:128)
	at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.start(HeadlessTestApplication.java:23)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.junit4.JUnit4Provider
	at org.eclipse.tycho.surefire.osgibooter.CombinedClassLoader.findClass(CombinedClassLoader.java:39)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:241)
	... 19 more

@lhstrh
Copy link
Member

lhstrh commented Apr 25, 2024

I don't understand the log. Is there a way to fix this?

@lhstrh lhstrh closed this Apr 25, 2024
@lhstrh lhstrh reopened this Apr 25, 2024
@lhstrh lhstrh requested a review from a-sr April 25, 2024 06:25
@soerendomroes
Copy link
Contributor Author

@lhstrh I have not the slightest idea how your test infrastructure works, so yes there might be a solution but I do not know it.
The first errors can be ignored and the surefire stuff seems to be the issue.

@soerendomroes
Copy link
Contributor Author

@lhstrh Can this be an issue of the runner?

Error: [ERROR] Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-21' -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-21'
``

@NiklasRentzCAU
Copy link

The semantics repository adapted to using the Maven structure during the last release, that was mainly done in this PR. It also does some restructuring of the language server for better debuggability of the LS from Eclipse, especially because the semantics uses other own Eclipse Plug-Ins in its language server. As I understand that might not be necessary here, as this repo does not contain the language server, but only the Eclipse application.
Updates to the newer target platforms of Eclipse, which caused some issues with the javax stuff were done in PR#97 and PR#108.

The semantics repository updated to the 2024-03 release, so you might not want to use the 2023-12 release anymore, or if you want use the corresponding XText version from there.

In the changes in the target platform in PR 97 you can also see how I needed to include an older update site in there to keep the JUnit4 tests working. You can either adapt that or switch to JUnit5 (which would cause other issues from my memory).

@soerendomroes
Copy link
Contributor Author

Hmm, it's that JavaSe-21 error again. When testing the build locally, I only get the following error:

Unexpected error while resolving /lib/ts on the classpath
	at org.lflang.ui.tests.TemplateCompilationTest.compileTemplate(TemplateCompilationTest.java:162)

Maybe I am missing part of the dependencies to build everything on my machine. @lhstrh can you run the build for Linux or Windows to check this?

@soerendomroes
Copy link
Contributor Author

@lhstrh I guess the issue is with the macos runner then.

@soerendomroes
Copy link
Contributor Author

The macos build has the following output:

Run echo "$JAVA_HOME_17_X64/bin" >> $GITHUB_PATH
/usr/bin/java
/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.3-9.0/arm64/Contents/Home/
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/homebrew/Cellar/maven/3.9.6/libexec
Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.3-9.0/arm64/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "14.4.1", arch: "aarch64", family: "mac"

Why does it use Java 21 if the build apparently this to use 17?

Also remove maven nature from org.lflang plugin to avoid deadline in
build (in eclipse).
I am not quite sure why there are so many dependencies in here. Usually
here should be only a few specified dependencies. Also jakarta does not
seem to be used. But maybe it is a transient dependency that has been
made explicit.
I test this later and I am not sure how we would start the LS in a
developer setup anymore from Eclipse.
@lhstrh lhstrh force-pushed the sdo/updateTargetPlatformAlittleMore branch from ab5c20a to c22b563 Compare April 26, 2024 18:44
@soerendomroes soerendomroes changed the title Update the target platform a little more Update the target platform to 2024-03, Xtext 2.34, Klighd 3.0.1, and ELK 0.9.1 Apr 26, 2024
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks, @soerendomroes!

@lhstrh lhstrh merged commit a0fbe29 into lf-lang:main Apr 26, 2024
4 checks passed
@lhstrh lhstrh added the upgrade label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants