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

Add nf-lang module from language-server #5876

Merged
merged 18 commits into from
Mar 20, 2025
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DOCUMENTATION -------------------------------------------------------
# Docs folder ownership
/docs/ @nextflow-io/docs

# COMPILER ------------------------------------------------------------
# nf-lang module
/modules/nf-lang/ @nextflow-io/lang
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ clean:
# install compiled artifacts in Maven local dir
#
install:
BUILD_PACK=1 ./gradlew installLauncher publishToMavenLocal -Dmaven.repo.local=${HOME}/.nextflow/capsule/deps/
BUILD_PACK=1 ./gradlew installLauncher publishToMavenLocal

#
# Show dependencies try `make deps config=runtime`, `make deps config=google`
Expand Down
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ allprojects {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = "https://s3-eu-west-1.amazonaws.com/maven.seqera.io/releases" }
maven { url = "https://s3-eu-west-1.amazonaws.com/maven.seqera.io/snapshots" }
maven {
url 'https://jitpack.io'
content { includeGroup 'com.github.nextflow-io.language-server' }
}
}

configurations {
Expand Down Expand Up @@ -241,7 +237,7 @@ task compile {

def getRuntimeConfigs() {
def names = subprojects
.findAll { prj -> prj.name in ['nextflow','nf-commons','nf-httpfs'] }
.findAll { prj -> prj.name in ['nextflow','nf-commons','nf-httpfs','nf-lang'] }
.collect { it.name }

FileCollection result = null
Expand All @@ -267,7 +263,7 @@ task exportClasspath {
def home = System.getProperty('user.home')
def all = getRuntimeConfigs()
def libs = all.collect { File file -> /*println file.canonicalPath.replace(home, '$HOME');*/ file.canonicalPath; }
['nextflow','nf-commons','nf-httpfs'].each {libs << file("modules/$it/build/libs/${it}-${version}.jar").canonicalPath }
['nextflow','nf-commons','nf-httpfs','nf-lang'].each {libs << file("modules/$it/build/libs/${it}-${version}.jar").canonicalPath }
file('.launch.classpath').text = libs.unique().join(':')
}
}
Expand All @@ -280,7 +276,7 @@ ext.nexusEmail = project.findProperty('nexusEmail')
// `signing.keyId` property needs to be defined in the `gradle.properties` file
ext.enableSignArchives = project.findProperty('signing.keyId')

ext.coreProjects = projects( ':nextflow', ':nf-commons', ':nf-httpfs' )
ext.coreProjects = projects( ':nextflow', ':nf-commons', ':nf-httpfs', ':nf-lang' )

configure(coreProjects) {
group = 'io.nextflow'
Expand Down
2 changes: 1 addition & 1 deletion modules/nextflow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ compileGroovy {
dependencies {
api(project(':nf-commons'))
api(project(':nf-httpfs'))
api 'com.github.nextflow-io.language-server:compiler:main-SNAPSHOT'
api(project(':nf-lang'))
api "org.apache.groovy:groovy:4.0.26"
api "org.apache.groovy:groovy-nio:4.0.26"
api "org.apache.groovy:groovy-xml:4.0.26"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
import org.codehaus.groovy.syntax.SyntaxException;

import static nextflow.script.ast.ASTHelpers.*;
import static nextflow.script.ast.ASTUtils.*;
import static org.codehaus.groovy.ast.tools.GeneralUtils.*;

/**
Expand Down
35 changes: 35 additions & 0 deletions modules/nf-lang/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2025, Seqera Labs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'antlr'
}

dependencies {
antlr 'org.antlr:antlr4:4.9.2'
api 'org.apache.groovy:groovy:4.0.26'
api 'org.pf4j:pf4j:3.12.0'

testImplementation ('net.bytebuddy:byte-buddy:1.14.17')
testImplementation ('org.spockframework:spock-core:2.3-groovy-4.0') { exclude group: 'org.apache.groovy' }
}

generateGrammarSource {
arguments += ['-no-listener', '-no-visitor']
}

tasks.named('sourcesJar') {
dependsOn tasks.named('generateGrammarSource')
}
Loading