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

fix #265: 24.10.x causes stackoverflowerror #268

Merged
merged 10 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.gradle
.idea
.nextflow*
gradle.properties
# gradle.properties

# Ignore Gradle build output directory
/build/
Expand Down
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ PROJECT ?= nf-quilt
WRITE_BUCKET ?= udp-spec
FRAGMENT ?= &path=.
NF_DIR ?= ../nextflow
NF_GIT ?= $(NF_DIR)/nextflow
NF_BIN ?= ./launch.sh
PID ?= $$$$
PIPELINE ?= sarek
QUERY ?= ?Name=$(USER)&Owner=Kevin+Moore&Date=2023-03-07&Type=CRISPR&Notebook+URL=http%3A%2F%2Fexample.com
VERSION ?= $(shell grep 'Plugin-Version' plugins/$(PROJECT)/src/resources/META-INF/MANIFEST.MF | awk '{ print $$2 }')
NXF_VER ?= $(shell cat VERSION)
TEST_URI ?= quilt+s3://$(WRITE_BUCKET)$(QUERY)\#package=nf-quilt/dest-$(VERSION)$(FRAGMENT)
PIPE_OUT ?= quilt+s3://$(WRITE_BUCKET)\#package=$(PROJECT)/$(PIPELINE)
S3_BASE = s3://$(WRITE_BUCKET)/$(PROJECT)
Expand All @@ -30,9 +32,15 @@ check-env:
clean:
./gradlew clean
rm -rf null results work
rm -rf */*/build plugins/nf-quilt/bin
rm -rf build */build */*/build plugins/nf-quilt/bin
rm -f .nextflow.log* .launch*classpath

clean-all: clean
rm -rf .gradle buildSrc/.gradle

rebuild:
./gradlew clean build --refresh-dependencies

compile:
./gradlew compileGroovy exportClasspath
@echo "DONE `date`"
Expand Down Expand Up @@ -107,6 +115,12 @@ $(PIPELINE): $(NF_BIN) install
$(NF_BIN) pull nf-core/$(PIPELINE)
$(NF_BIN) run nf-core/$(PIPELINE) -profile test,docker -plugins $(PROJECT)@$(VERSION) --outdir "$(PIPE_OUT)"

fetchngs: $(NF_GIT)
NXF_VER=$(NXF_VER) $(NF_BIN) run quiltdata/fetchngs -r master -profile test,docker --input wf/ids.csv --outdir "s3://$(WRITE_BUCKET)/nf-quilt/fetchngs"

nf-git-ver: $(NF_GIT)
NXF_VER=$(NXF_VER) $(NF_GIT) -v

#
# Show dependencies
#
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23.04.3
23.10.0
79 changes: 41 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ if (groovyVer) {
maven { url repo }
}

configurations.all {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.codehaus.groovy') {
force 'cglib:cglib-nodep:3.3.0'
force 'org.objenesis:objenesis:3.4'

// (Optional) If transitive Groovy dependencies cause conflicts
force 'org.codehaus.groovy:groovy:3.0.19'
if ((details.requested.group == 'org.codehaus.groovy') && details.requested.version != groovyVer) {
if (groovyVer.contains(':')) {
details.useTarget(groovyVer)
}
Expand All @@ -49,12 +54,8 @@ if (groovyVer) {
}
}

def projects(String...args) {
args.collect { project(it) }
}

group = 'io.nextflow'
version = rootProject.file('VERSION').text.trim()

allprojects {
apply plugin: 'java'
Expand All @@ -65,17 +66,17 @@ allprojects {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(javaLangVersion)
}
}

compileJava {
options.release = 11
options.release = jdkVersion.toInteger()
}

tasks.withType(GroovyCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
tasks.withType(GroovyCompile).configureEach {
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
}

idea {
Expand All @@ -98,8 +99,8 @@ allprojects {

dependencies {
// see https://docs.gradle.org/4.1/userguide/dependency_management.html#sec:module_replacement
implementation 'com.github.groovy-wslite:groovy-wslite:1.1.3'
implementation 'org.codehaus.groovy:groovy-all:3.0.23'
// implementation 'com.github.groovy-wslite:groovy-wslite:1.1.3'
implementation "org.codehaus.groovy:groovy-all:$groovyVersion"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
implementation 'com.upplication:s3fs:2.2.2'

Expand All @@ -108,8 +109,8 @@ allprojects {
}
// Documentation required libraries
groovyDoc 'org.fusesource.jansi:jansi:2.4.1'
groovyDoc 'org.codehaus.groovy:groovy-groovydoc:3.0.23'
groovyDoc 'org.codehaus.groovy:groovy-ant:3.0.23'
groovyDoc "org.codehaus.groovy:groovy-groovydoc:$groovyVersion"
groovyDoc "org.codehaus.groovy:groovy-ant:$groovyVersion"
}

test {
Expand All @@ -127,42 +128,44 @@ allprojects {
// Disable strict javadoc checks
// See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
tasks.withType(Javadoc).configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

tasks.withType(Jar) {
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

// patched as described here
// http://forums.gradle.org/gradle/topics/gradle_task_groovydoc_failing_with_noclassdeffounderror
tasks.withType(Groovydoc) {
tasks.withType(Groovydoc).configureEach {
groovyClasspath = project.configurations.groovyDoc
includes = ['nextflow/**']
}

// Required to run tests on Java 9 and higher in compatibility mode
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
tasks.withType(Test) {
jvmArgs([
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
'--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.fs=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED',
'--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED',
])
tasks.withType(Test).tap {
configureEach {
jvmArgs([
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
'--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.fs=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED',
'--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED',
])
}
}
}
}
Expand Down Expand Up @@ -195,8 +198,8 @@ task exportClasspath {
dependsOn allprojects.jar
doLast {
def all = getRuntimeConfigs()
def libs = all.collect { File file -> file.canonicalPath; }
['nextflow', 'nf-commons', 'nf-httfs'].each { libs << file("modules/$it/build/libs/${it}-${version}.jar").canonicalPath }
def libs = all.collect { File file -> file.canonicalPath }
['nextflow', 'nf-commons', 'nf-httfs'].each { libs << file("modules/$it/build/libs/${it}-${nextflowVersion}.jar").canonicalPath }
file('.launch.classpath').text = libs.unique().join(':')
}
}
14 changes: 14 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
id 'groovy-gradle-plugin'
}

repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'io.nextflow.groovy-common-conventions'

// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the groovy Plugin to add support for Groovy.
id 'groovy'
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

ext {
jdkVersion = '11'
javaLangVersion = 19
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(javaLangVersion) // from nf-schema
}
}

compileJava {
options.release.set(jdkVersion.toInteger())
}

tasks.withType(GroovyCompile) {
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
}

tasks.withType(Test) {
jvmArgs ([
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
'--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.fs=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
'--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED',
'--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED',
])
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'io.nextflow.groovy-common-conventions'
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
}

4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nextflowVersion = 23.10.0
groovyVersion = 3.0.19
jdkVersion = 11
javaLangVersion = 19
8 changes: 4 additions & 4 deletions groovysh-task.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ gradle.projectsLoaded {
afterEvaluate { project ->
if (!project.repositories.any { it.name == 'MavenRepo' }) {
project.repositories {
// To be able to load org.apache.groovy:groovy-groovysh and dependencies
// To be able to load org.codehaus.groovy:groovy-groovysh and dependencies
mavenCentral {
content {
includeGroup 'org.apache.groovy'
includeGroup 'org.codehaus.groovy'
includeGroup 'jline'
includeGroup 'com.github.javaparser'
includeGroup 'org.ow2.asm'
Expand All @@ -21,7 +21,7 @@ gradle.projectsLoaded {
}

project.dependencies {
groovyshdependencies 'org.apache.groovy:groovy-groovysh:4.0.24'
groovyshdependencies 'org.codehaus.groovy:groovy-groovysh:4.0.24'
}

project.tasks.register('groovysh') {
Expand All @@ -35,7 +35,7 @@ gradle.projectsLoaded {

def groovyshClass
def groovyShell
groovyshClass = Class.forName('org.apache.groovy.groovysh.Groovysh', true, groovyshClassLoader)
groovyshClass = Class.forName('org.codehaus.groovy.groovysh.Groovysh', true, groovyshClassLoader)
if (groovyshClass) {
groovyShell = groovyshClass.newInstance()
if (groovyShell) {
Expand Down
Loading
Loading