Package Details: groovy-language-server-git r202.8b5fbc3-1

Git Clone URL: https://aur.archlinux.org/groovy-language-server-git.git (read-only, click to copy)
Package Base: groovy-language-server-git
Description: A language server for Groovy
Upstream URL: https://github.com/GroovyLanguageServer/groovy-language-server
Licenses: Apache
Submitter: m-pilia
Maintainer: m-pilia
Last Packager: m-pilia
Votes: 2
Popularity: 0.000027
First Submitted: 2019-06-15 23:29 (UTC)
Last Updated: 2024-05-19 05:46 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

m-pilia commented on 2024-05-25 15:23 (UTC)

@rubin55: Your suggestion does not seem to work in a clean chroot:

Welcome to Gradle 8.7!

Here are the highlights of this release:
 - Compiling and testing with Java 22
 - Cacheable Groovy script compilation
 - New methods in lazy collection properties

For more details see https://docs.gradle.org/8.7/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66
> Unsupported class file major version 66

So for the moment I will leave the PKGBUILD as it is, as the current version correctly builds in a clean chroot (which is how packages should be officially built).

m-pilia commented on 2024-05-19 17:46 (UTC)

so people can build without installing ancient java versions

The PKGBUILD should build fine inside a clean chroot, as I tested it myself with extra-x86_64-build. I guess when building in a non-hermetic environment there is the possibility that a newer Java version is picked up from the system, breaking the build.

I will have a look at this as soon as I have a moment and see if it can be made more robust, but in the meantime extra-x86_64-build should hopefully work.

rubin55 commented on 2024-05-19 08:33 (UTC)

I'm getting the following error after your update:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'groovy-language-server'.
> Could not open cp_proj generic class cache for build file '/tmp/makepkg.builddir/groovy-language-server-git/src/groovy-language-server/build.gradle' (/home/rubin/.gradle/caches/7.6.1/scripts/bzkdwz7o2xfnvfmb8qyo22cs2).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
==> ERROR: A failure occurred in build().

This happens due to the parent repo using a 4 year old gradlew which doesn't work with recent Java versions (like 21). The jar produced is configured to run on java versions 8 and higher by the build.gradle, but the build.gradle itself depends on an ancient version of the shadow plugin that in turn doesn't work with gradle above version 6. You can upgrade that to 8.1.1 and use gradle 8.7 and it will build + run afaict. I would thus recommend to makedepend on gradle package, and patch build.gradle, so people can build without installing ancient java versions.

a file to patch the build.gradle file, called build.patch:

--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
 plugins {
-  id "com.github.johnrengelman.shadow" version "5.2.0"
+  id "com.github.johnrengelman.shadow" version "8.1.1"
   id "java"
 }

diff for PKGBUILD changes:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,10 +8,10 @@ pkgdesc="A language server for Groovy"
 arch=('any')
 url="https://github.com/GroovyLanguageServer/groovy-language-server"
 license=('Apache')
-depends=('java-runtime<=19')
-makedepends=('git')
-source=('git+https://github.com/GroovyLanguageServer/groovy-language-server')
-md5sums=('SKIP')
+depends=('java-runtime')
+makedepends=('git' 'gradle')
+source=('git+https://github.com/GroovyLanguageServer/groovy-language-server' build.patch)
+md5sums=('SKIP' '71aefdddc4f7720b7999f41c74188d2c')

 pkgver() {
        cd "$srcdir/${_pkgname}" || exit 1
@@ -20,7 +20,8 @@ pkgver() {

 build() {
        cd "$srcdir/${_pkgname}" || exit 1
-       bash ./gradlew build
+    cat "$srcdir/build.patch" | patch -p1
+       gradle build
 }

 package() {