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

Split into subprojects for compiler and language server #73

Merged
merged 10 commits into from
Nov 20, 2024

Conversation

bentsherman
Copy link
Member

The build seems to work:

./gradlew build

And produces the following files:

$ find build/
build/
build/libs
build/libs/language-server.jar
build/tmp
build/tmp/jar
build/tmp/jar/MANIFEST.MF

But the manifest seems to be wrong:

$ java -jar build/libs/language-server.jar 
no main manifest attribute, in build/libs/language-server.jar

I think something is wrong with the shadow JAR build, even though I didn't change any settings for it in the gradle build

@bentsherman

This comment was marked as outdated.

@bentsherman

This comment was marked as outdated.

@bentsherman

This comment was marked as outdated.

build.gradle Outdated Show resolved Hide resolved
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
@bentsherman
Copy link
Member Author

I added a convention plugin and a task to copy the shadow JAR to the top-level

Now I am testing the gradle build for the vs code extension and getting this error:

Could not determine the dependencies of task ':language-server:copyJar'.
> Task with path ':modules:language-server:build' not found in project ':language-server'.

The vs code extension has this settings.gradle:

rootProject.name = 'vscode-language-nextflow'
include 'language-server'

And this gradle task to copy the shadow JAR into the extension build:

task copyJar(type: Copy) {
  dependsOn ':language-server:build'
  from "$projectDir/language-server/build/libs/language-server-all.jar"
  into "$buildDir/bin"
}

For some reason, gradle can't find the build task for the language server subprojects when building from the vs code extension

@bentsherman bentsherman marked this pull request as ready for review November 20, 2024 19:34
@bentsherman
Copy link
Member Author

I need to keep moving with other things so I'm going to merge what I have for now. I can make it work by manually building the language server JAR and only copying it from the vs code build:

// settings.gradle (vs code extension)
rootProject.name = 'vscode-language-nextflow'
// include 'language-server'

// build.gradle (vs code extenstion)
task copyJar(type: Copy) {
  // dependsOn ':language-server:build'
  from "$projectDir/language-server/build/libs/language-server-all.jar"
  into "$buildDir/bin"
}
# from the vs code repo
cd language-server
./gradlew build
cd ..
./gradlew build

I suspect there is just something wrong in the language server gradle build. If either of you have any more pointers or can spot the issue, please let me know

@bentsherman bentsherman merged commit eb81457 into main Nov 20, 2024
1 check passed
@bentsherman bentsherman deleted the subprojects branch November 20, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants